2gis / Winium.Mobile

Winium.Mobile is Selenium Remote WebDriver implementation for automated testing of Windows StoreApps and Silverlight apps, tested on emulators (currently only Windows Phone/Mobile apps are supported).
Mozilla Public License 2.0
51 stars 29 forks source link

Invalid behavior of 'ExecuteMobileScript' method with parameters OnScreenKeyboard.Enable/Disable #127

Open dnovikau opened 8 years ago

dnovikau commented 8 years ago

Running mentioned method with parameters either 'OnScreenKeyboard.Enable' or 'OnScreenKeyboard.Disable' like in example https://github.com/2gis/Winium.StoreApps/wiki/Command-Execute-Script does not works as expected:

  1. by executing the method with parameter 'OnScreenKeyboard.Disable' I expect the keyboard on emulator to disappear, but the action does not happen
  2. on the other hand running the script with 'OnScreenKeyboard.Enable' does not enables keyboard

if to update mention method with adding new predefined parameter will resolve issue with hidding the keyboard: image

NickAb commented 8 years ago

@dnovikau it seems that keyboard toggling using hot key is disabled in Mobile 10 emulators. back command can only be used to hide keyboard, not show it. Also, I believe that applications can override reaction on back event, so it might be confusing if we replace OnScreenKeyboard.Disable with back. I think it would be better to explicitly call back action when wanting to hide keyboard on Mobile 10 emulators. If OnScreenKeyboard.* is called on Mobile 10, then exception should be raised with clarifying message. Also, it would be nice to find out if there is any replacement for Page Up and Page Down shortcuts for Mobile 10.

dnovikau commented 8 years ago

The following article contains info about keys applicable in win10 emulator

NickAb commented 8 years ago

@dnovikau there is no link

NickAb commented 8 years ago

I found this on msdn

One important user interface change has been made. In this version of the emulator, the keyboard shortcut to show or hide the hardware keyboard is now F4, acting as a toggle, rather than the Page Up/Page Down pair of keys used in earlier emulators.

Here is one more msdn link to a table with shortcuts.

So, we need to use F4 to toggle keyboard now, which is a problem, because I am not sure if we will be able to tell the result of the command. Page Up and Page Down allowed to explicitly hide or show keyboard, while toggling depends on previous state. I think calling back to hide keyboard is more explicit, as it can only hide keyboard, not make it appear. Anyway, we can add keyboard toggle command at the moment. Explicit hiding/showing keyboard will need more research.

dnovikau commented 8 years ago

here is the link: https://msdn.microsoft.com/en-us/library/dn632391.aspx