sammy1983 Posted February 19, 2014 Share Posted February 19, 2014 Hi, I have a Search button on a webpage but the button doesn't have "name" or "id". Attached is for reference. How can I click on it? Link to comment Share on other sites More sharing options...
Danp2 Posted February 19, 2014 Share Posted February 19, 2014 You didn't specify a browser, so I am going to assume IE. See the help file entry for _IEFormElementGetCollection. If you search the forums, you should find plenty of examples that will point you in the right direction. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
bogQ Posted February 19, 2014 Share Posted February 19, 2014 (edited) can you try to call that func instead of click ? $Pagebuffer.document.parentwindow.execScript('javascript:search()', "javascript") or $Pagebuffer.document.parentwindow.execScript('search()', "javascript") Edited February 19, 2014 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
sammy1983 Posted February 19, 2014 Author Share Posted February 19, 2014 can you try to call that func instead of click ? $Pagebuffer.document.parentwindow.execScript('javascript:search()', "javascript") or $Pagebuffer.document.parentwindow.execScript('search()', "javascript") Below code worked. Thanks. $oLinks = _IETagNameGetCollection($oIE, "input") For $oLink In $oLinks If String($oLink.type) = "button" And String($oLink.value) = "Search" Then _IEAction($oLink, "click") ExitLoop EndIf Next _IELoadWait($oIE, 1000) 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