Liromir Posted June 24, 2014 Posted June 24, 2014 Hello! Its my first time on this forum, usually i was just reading topics here, but from the beggining of my adventure with AutoIt! i have problems with clicking buttons in IE. Always i was using something like that: Local $oInputs = _IEFormElementGetObjByName($ie, "submit") For $oInput In $oInputs If $oInput.title == "login" Then _IEAction($oInput, "click") _IELoadWait($ie) Exitloop EndIf Next And now i have problem with new button/page : <a title="Login" href="javascript:void(0);" onclick="submitLogin(document.loginForm);return false;" class="btn-senden btn-login">Login</a> Im fighting with clicking this button for like 2 days, i read whole forums and still cant find any solutions, can you please good peoples help me? Thanks in advance
Danp2 Posted June 24, 2014 Posted June 24, 2014 Search the forum for threads with "execScript" in it's contents. Latest Webdriver UDF Release Webdriver Wiki FAQs
Liromir Posted June 24, 2014 Author Posted June 24, 2014 i tried it also, im so desperated - whole project stopped only because one button. I still believe some 'big brain' will visit my thread and have 2 minutes for me and my problem ;x
Solution Danp2 Posted June 24, 2014 Solution Posted June 24, 2014 Sorry, but I'm not a mind reader. When the standard _IE methods don't work on Javascript, you typically have to resort to using execScript. I note from your html that you are dealing with a link. Did you try this? _IELinkClickByText($oIE, "Login") Latest Webdriver UDF Release Webdriver Wiki FAQs
Moderators JLogan3o13 Posted June 24, 2014 Moderators Posted June 24, 2014 I have run into the same issue (below) and have found the same thing that Danp2 is suggesting. I would remind the OP that this is not a forum where you sit about bemoaning the fact that your script doesn't work, hoping someone will barf up code for you. Do a forum search as has been suggested, and try some things on your own, and you should hit upon the answer in short order. '?do=embed' frameborder='0' data-embedContent>> "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Liromir Posted June 24, 2014 Author Posted June 24, 2014 On 6/24/2014 at 6:37 PM, Danp2 said: Sorry, but I'm not a mind reader. When the standard _IE methods don't work on Javascript, you typically have to resort to using execScript. I note from your html that you are dealing with a link. Did you try this? _IELinkClickByText($oIE, "Login") Very very thank you man, didnt even expectet that can be so easy, i was trying 20 lines scripts and this one just worked.. Love you!
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