karudish Posted August 15, 2014 Share Posted August 15, 2014 (edited) Hi, i use Firebug to get information about buttons i want to click with _FFClick (from FF.au3 UDF), but now i found a button that doesn't have neither id, nor name or tag (or if it does i cant see it).. How can i simulate a click then? Ps. Dont know if it matters, but the html code of the button is the "<span></span>" line on this code below: <dd> <div class="variant-holder"> <div class="variant-holder"> <div class="variant-holder"> <div class="variant-holder"> <input id="Animes" type="radio" value="Animes" onchange="this.form.submit();" name="TypeAction"> <label for="Animes"> <span></span> Animes </label> </div> </dd> Edited August 15, 2014 by karudish Link to comment Share on other sites More sharing options...
Solution Danp2 Posted August 15, 2014 Solution Share Posted August 15, 2014 (edited) Not sure that I follow your description of the issue. This doesn't work? $oButton = _FFXPath( "//input[@id='Animes']" ) _FFClick($oButton) Edited August 15, 2014 by Danp2 karudish 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
karudish Posted August 15, 2014 Author Share Posted August 15, 2014 @Danp2, thanks for response, however that doesn't work. On SciTE appears this: __FFSend ==> Socket Error _FFCmd ==> Error return value __FFSend ==> Socket Error _FFCmd ==> Error return value _FFClick ==> No match: $sElement: FFau3.xpath Also, the _FFXPath Function is returning "OBJECT|FFau3.xpath" to the variable $oButton, was that supposed to happen? ps. i also removed the extra bracket at the end of you code. Link to comment Share on other sites More sharing options...
Danp2 Posted August 15, 2014 Share Posted August 15, 2014 You've posted limited info, so as I stated earlier I'm not sure that I understand the issue. On SciTE appears this: __FFSend ==> Socket Error _FFCmd ==> Error return value __FFSend ==> Socket Error _FFCmd ==> Error return value This is concerning... do you have Mozrepl installed and running? Also, the _FFXPath Function is returning "OBJECT|FFau3.xpath" to the variable $oButton, was that supposed to happen? I believe this is the expected behavior. ps. i also removed the extra bracket at the end of you code. Thanks! karudish 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
karudish Posted August 15, 2014 Author Share Posted August 15, 2014 (edited) Its working now! I don't know why, neither how it's working, but i think it was a problem with my script! Thank you very much Btw, the code that you posted won't work alone.. I put it this way to work: If _FFConnect(Default, Default, 3000) Then $oButton = _FFXPath( "//input[@id='Animes']" ) _FFClick($oButton) EndIf Maybe i should know that it needed to be that way from the beggining but i'm really inexperienced with AutoIT ( I didn't really understood what your code does xD but anyway i get the result i want I'll mark this post as solved, but i'll make sure that i'll investigate a bit more about that "object" thingy eheh Thank you again. Edited August 15, 2014 by karudish Link to comment Share on other sites More sharing options...
Danp2 Posted August 15, 2014 Share Posted August 15, 2014 Glad you got it working. FWIW, I knew the code wouldn't work as posted. It was just a snippet of code designed to be plugged into your existing script. The first line of the code you posted retrieves the input field with the ID equal to "Subscriber". This wasn't in the original html that you posted; What website are you automating? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
karudish Posted August 15, 2014 Author Share Posted August 15, 2014 Yeah i know, i changed that to protect the anonymity of my script. I noticed that here in the forum there are some rules against teaching about game automation, the more my script was about to automate some clicks on youtube, i got afraid that nobody would help me if i said for what it was in the first place .. Though it is not a spam bot script neither nothing harmful, don't worry Link to comment Share on other sites More sharing options...
Danp2 Posted August 15, 2014 Share Posted August 15, 2014 Not sure why you were concerned about game automation if you aren't interacting with a game. Chances are that people won't help when they feel that they are being misled. 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