bagas9425 Posted January 13, 2016 Share Posted January 13, 2016 Hi, everyone.I cannot press "Submit" image on Login website using FF.au3#include <FF.au3> #include <FFex.au3> _FFStart() _FFOpenURL("https://url") _FFTabSetSelected() _FFSetValueByName("username") _FFSetValueByName("msisdn") _FFSetValueByName("password") Sleep(1000) _FFImageClick("visual/images/login-btn.png") I have been using IE.au3 with _IEFormImageClick($oIE, "visual/images/login-btn.png", "src") and it's successful.I want to use Firefox now because I got some error on IE like crash, etc.Can you all help me? Thanky ou. Link to comment Share on other sites More sharing options...
junkew Posted January 13, 2016 Share Posted January 13, 2016 (edited) something like this can do the trick thru addressbar in any browserCould be more complex for an image if its not having a uniquename or id that the javascript needs to be a little longer with a for / next loopjavascript:document.getElementsByName("uniquename")[0].click();void(0);More complex one clicking on all imagesjavascript:(function(){var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++)imgs[i].click()}());void(0);you can extend it with an if imgs.name="visual/images/login-btn.png" then imgs[i].click(); Edited January 13, 2016 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets 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