MarkLee Posted March 16, 2015 Posted March 16, 2015 This is code for address bar on web browser. javascript:{var evnt = window.document.createEvent('KeyboardEvent');evnt.initKeyEvent('keypress', true, true, window, false, false, false, false, 13, 13);window.document.getElementById('masthead-search-term').dispatchEvent(evnt);void(0)} How convert to _FFcmd ? thanks very much!
mpower Posted March 16, 2015 Posted March 16, 2015 (edited) Send("{ENTER}") ask silly questions get silly answers Edited March 16, 2015 by mpower
MarkLee Posted March 16, 2015 Author Posted March 16, 2015 I trying _FFCmd("evnt = window.document.createEvent('KeyboardEvent');evnt.initKeyEvent('keypress', true, true, window, false, false, false, false, 13,13);window.document.getElementById('masthead-search-term').dispatchEvent(evnt);")
MarkLee Posted March 16, 2015 Author Posted March 16, 2015 No no. I want press Enter key from FF.au3 UDF. Thanks for reply.
mpower Posted March 16, 2015 Posted March 16, 2015 are you able to provide the full html code of the target page?
Danp2 Posted March 16, 2015 Posted March 16, 2015 Have you tried this? $input = _FFXPath('//*[@id="masthead-search-term"]') _FFDispatchEvent($input, 'keypress', 13) Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now