Winium.Mobile icon indicating copy to clipboard operation
Winium.Mobile copied to clipboard

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

Open dnovikau opened this issue 8 years ago • 5 comments

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

dnovikau avatar Dec 22 '15 15:12 dnovikau

@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.

NickAb avatar Dec 23 '15 02:12 NickAb

The following article contains info about keys applicable in win10 emulator

dnovikau avatar Jan 06 '16 11:01 dnovikau

@dnovikau there is no link

NickAb avatar Jan 06 '16 12:01 NickAb

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.

NickAb avatar Jan 06 '16 12:01 NickAb

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

dnovikau avatar Jan 06 '16 13:01 dnovikau