MarkLee Posted March 16, 2015 Share 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! Link to comment Share on other sites More sharing options...
mpower Posted March 16, 2015 Share Posted March 16, 2015 What are you trying to do? Link to comment Share on other sites More sharing options...
MarkLee Posted March 16, 2015 Author Share Posted March 16, 2015 press Enter Key Link to comment Share on other sites More sharing options...
mpower Posted March 16, 2015 Share Posted March 16, 2015 (edited) Send("{ENTER}") ask silly questions get silly answers Edited March 16, 2015 by mpower Link to comment Share on other sites More sharing options...
MarkLee Posted March 16, 2015 Author Share 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);") Link to comment Share on other sites More sharing options...
MarkLee Posted March 16, 2015 Author Share Posted March 16, 2015 No no. I want press Enter key from FF.au3 UDF. Thanks for reply. Link to comment Share on other sites More sharing options...
mpower Posted March 16, 2015 Share Posted March 16, 2015 are you able to provide the full html code of the target page? Link to comment Share on other sites More sharing options...
Danp2 Posted March 16, 2015 Share 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 Link to comment Share on other sites More sharing options...
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