Search the Community
Showing results for tags '_wd_action'.
-
First off, Thank you for hard work on the WebDriver UDF. I would like to comment on the latest version. I love Autoit and all that have contributed. The Function _WD_ElementAction specifically where it was previously used to Send Keyboard keys for example "Enter". In previous versions a keyboard key like Enter ( "\uE007") could be sent as _WD_ElementAction($sSession,$sElement,"value","\uE007") This would send a keyboard Enter to $sElement. This works Great. I do not understand how to do this, _WD_Action($sSession,"actions","\uE007") does Not work. I realize that I may have to create a Json object to replicate this. My Solution for now will be to change wd_Core and remove "__WD_EscapeString($sOption)" and replace it with "$sOption" I always reference back to my "idea of Autoit" and that is to "Simplify windows". So if WebDriver is to be "W3C" compliant, I would hope that an additional function / option would be created to handle Keyboard Keys. Here is an Example of what I am commenting on; ===================================================================================================== Native Autoit Solution; Local $hWD=Winactivate("Autoit") WinWaitActive($hWD,3) Send("{ENTER}") Old WebDriver Solution; _WD_ElementAction($sSession,_WD_FindElement($sSession,"xpath","//*[@id="elSearchField"]"),"value","\uE007") New WebDriver Solution; Local $sAction = '{"actions":[{"type": "key", "id": "keyboard_1", "actions": [{"type": "keyDown", "value": "\uE009"}, ' & _ '{"type": "keyDown", "value": "\uE007"}, {"type": "keyUp", "value": "uE007"}"]}]}' _WD_Action($sSession, "actions", $sAction) ============================================================================================================ Thank you RobB
- 3 replies
-
- _wd_action
- _wd_elementaction
-
(and 3 more)
Tagged with: