Vitaliy4us Posted May 3, 2015 Share Posted May 3, 2015 There is a button on a page created with HTML code:<div class="product_size_item sizes__button_on " data-stock="3" data-mdp-id="12091904" data-sizetype="Unspecified" > 39 </div>Is it possible to use this data as arguments of function _FFClick () for clicking on this button? I tried these ones:_FFClick("product_size_item sizes__button_on ", "class", 2) _FFClick("12091904", "id") _FFClick("12091904") _FFCmd(".getElementById('12091904').onclick();")but it does not work. Link to comment Share on other sites More sharing options...
Danp2 Posted May 3, 2015 Share Posted May 3, 2015 Sounds like the issue is something besides _FFClick. You'll need to provide some more details (a script that we can run to demonstrate the issue, output from the Scite window, etc) if you want further assistance. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Vitaliy4us Posted May 3, 2015 Author Share Posted May 3, 2015 Thank you for your reply. You are absolutely right. As I found out, the problem lays in another field. Actually, function_FFClick("product_size_item sizes__button_on ", "class", 2)works and returns 1 which means successful result. But nothing happens. I mean that the button is not really pressed. For example we have 3 buttons. If we use 0,1 or 2 as the last function's argument, the function returns 1 but no button is pressed. If we use 3, the function returns 0. The very simple code is attached:#Include <FF.au3> Opt("WinTitleMatchMode", 2) WinActivate ("Mozilla Firefox") Sleep (1000) _FFConnect() Sleep (1000) _FFOpenURL ("https://modnakasta.ua/product/7499459/") Sleep (1000) For $i = 0 to 3 Local $result = _FFClick("product_size_item sizes__button_on ", "class", $i) Sleep (1000) MsgBox (0, "", $result) Next Link to comment Share on other sites More sharing options...
Danp2 Posted May 3, 2015 Share Posted May 3, 2015 What exactly isn't working as expected? When I run your script, each button is selected (highlighted in green) as I would expect. Vitaliy4us 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Vitaliy4us Posted May 3, 2015 Author Share Posted May 3, 2015 What exactly isn't working as expected? When I run your script, each button is selected (highlighted in green) as I would expect.But I am not able to do the same. Any button is highlighted in green after using FFClick Link to comment Share on other sites More sharing options...
Danp2 Posted May 3, 2015 Share Posted May 3, 2015 Sorry but I don't understand. Exactly what isn't working for you? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Vitaliy4us Posted May 3, 2015 Author Share Posted May 3, 2015 (edited) Sorry but I don't understand. Exactly what isn't working for you? The script does nothing. The buttons are not selected (they are not highlighted in green). And now I know the reason. The reason is Firefox version. The script starts working after installing the older version (14) instead of the newest 37 version. Could you tell me what is your Firefox version? Edited May 3, 2015 by Vitaliy4us Link to comment Share on other sites More sharing options...
Danp2 Posted May 4, 2015 Share Posted May 4, 2015 Could you tell me what is your Firefox version?37.0.2 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