I have a grid-component which has a multiple-column-sort feature. The multi-column-sort feature is activated by:
I tried to record this using coded-ui-tests but the recording was like this:
So the coded ui test builder does not seem to grasp that I'm actually holding the shift-button. Has anyone had a similar problem? Is there a workaround?
I think you can use:
Keyboard.PressModifierKeys(ModifierKeys.SHIFT);
Mouse.Click
Mouse.Click
Keyboard.ReleaseModifierKeys(ModifierKeys.SHIFT);
PressModifierKeys: https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.uitesting.keyboard.pressmodifierkeys.aspx
ReleaseModifierKeys: https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.uitesting.keyboard.releasemodifierkeys.aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.