ugakebet 4 Posted January 31, 2012 Report Share Posted January 31, 2012 I wanna fill up a textbox and the label before it says "name::", so what i do is type text(<before="Name::">, #forums_fn, "Standard") the only problem with this is that it enters my variable in the text box 5 times and not just once... is it because now the above code, in node-editing format, shows me that the attributes- before, after, innertext (and 2 others) all give "name::" what i mean to say is ubot getting confused and so entering the variable in the textbox 5 times due to these additional matching attributes? (it shouldn't really happen coz i have chosen the textbox which has an BEFORE attribute "name::" any solution to enter just once? i have tried element_offset to no avail Quote Link to post Share on other sites
JohnB 255 Posted January 31, 2012 Report Share Posted January 31, 2012 Can you provide a url? John Quote Link to post Share on other sites
ugakebet 4 Posted February 1, 2012 Author Report Share Posted February 1, 2012 Hey Hohn, here is the site i am trying for My link enter any date and proceed to the next page, notice the label that says "name:", try to select that textbox adjoining it and choose the 'BEFORE' attribut as i mentioned in the earlier post, and see what happens. (i am trying to use the wildcards thing as i want to match "NAME" and not "NAME::" [i dont want the 2 colons to be matched]) lemme know -alvito Quote Link to post Share on other sites
JohnB 255 Posted February 1, 2012 Report Share Posted February 1, 2012 This works fine for me... navigate("http://www.audizine.com/forum/register.php", "Wait")change dropdown(<name="month">, "Random - Skip First Choice")change dropdown(<name="day">, "Random - Skip First Choice")type text(<name="year">, $rand(1940, 1990), "Standard")click(<accesskey="s">, "Left Click", "No")wait(4)change attribute(<name="userfield[field6]">, "value", "John") John Quote Link to post Share on other sites
ugakebet 4 Posted February 2, 2012 Author Report Share Posted February 2, 2012 hey john, you are using a "name=userfield[field6]" attribute so it works, i tried to modify your same code and i used, change attribute(<before="Name::">, "value", "John") and it works perfectly (as to what i want), but then tell me why does the following code enter "john", 5 times?? type text(<after="Name::">, "john", "Standard") shouldnt the 'change attribute' and 'type text' selectors give the same thing to me? Quote Link to post Share on other sites
ugakebet 4 Posted February 2, 2012 Author Report Share Posted February 2, 2012 (edited) another question john, see the two fields on the site that say 'daily driver' and 'please confirm your legitimate interest in our community (enter the 4th letter of the word _________)', how would i get these to pop up as captcha so that the user can enter them? Edited February 2, 2012 by ugakebet Quote Link to post Share on other sites
JohnB 255 Posted February 2, 2012 Report Share Posted February 2, 2012 another question john, see the two fields that say 'daily driver' and pleases confirm your legitemate Yes, I see them... Quote Link to post Share on other sites
ugakebet 4 Posted February 2, 2012 Author Report Share Posted February 2, 2012 hmmm i think you saw my post before i edited it, see if you can answer the question i put up, thanks -al Quote Link to post Share on other sites
JohnB 255 Posted February 2, 2012 Report Share Posted February 2, 2012 I think you'll like this...but keep in mind...I loaded that page about 300 times and the human verification question never changed: navigate("http://www.audizine.com/forum/register.php", "Wait")change dropdown(<name="month">, "Random - Skip First Choice")change dropdown(<name="day">, "Random - Skip First Choice")type text(<name="year">, $rand(1940, 1990), "Standard")click(<accesskey="s">, "Left Click", "No")wait(4)change attribute(<name="userfield[field6]">, "value", "John")change attribute(<name="userfield[field8]">, "value", $prompt($replace($scrape attribute(<innertext=w"To confirm that you\'re a real person *">, "innertext"), "To confirm that you\'re a real person and not a spam bot, ", $nothing))) John Quote Link to post Share on other sites
ugakebet 4 Posted February 2, 2012 Author Report Share Posted February 2, 2012 John, YOU DA MAN... that was freakin' brilliant....... you wont believe how many times i refreshed this page just to check if there was a reply to my post!!!! :) :rolleyes: just a thought, if im trying to implement this on other websites, how do i choose the element_to_change thing? for instance in this website i can use change attribute(<name="userfield[field8]">, but what about other websites, i cant use [field8] coz they might have different names or id or classes etc.... so how do i generalize this code so that i can get it to work on like 10 or so diff websites? Quote Link to post Share on other sites
JohnB 255 Posted February 2, 2012 Report Share Posted February 2, 2012 You can't make universal in that sense...but you can code it for each site and place each one in a custom command and then just call the command that is appropriate to the site. Actually, you may be able to by using the OR operator in a single scrape. You would just need to get the id's or names from all the sites and set it up like this: <id="[field8]" OR name="human_verify" OR id="something" OR name="somethingelse"> etc make sense? John Quote Link to post Share on other sites
ugakebet 4 Posted February 2, 2012 Author Report Share Posted February 2, 2012 hmmmm yea that makes sense using the logical OR operant... Ill try that and see it thru, thanks for the help mate Quote Link to post Share on other sites
jimbourekas@yahoo.gr 1 Posted February 5, 2013 Report Share Posted February 5, 2013 I know it's been more than a year since this thread was updated, but I just read it. What is this syntax for? change attribute(<name="userfield[field8]">, Is this an array type? jim Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.