Marani 80 Posted August 17, 2016 Report Share Posted August 17, 2016 Hi, I'm making a simple Wordpress poster to learn Ubot. Everything works well so far, except, selecting the chosen Category by user. (Ubot gets the list of the cats and adds them to a dropdown). The thing is, I have no idea how to find the chosen checkbox by user.Using a simple "Change Attribute" command is NOT what I mean. For example: Wordpress Categories are: "Dogs", "Cats", "Ducks". They are added to a dropdown automatically (using list command and functions) when user logs in to the site. User choose "Dogs", fill other fields and clicks on "Post to Website" button. I get what user have chosen (name and unique category number), now I need to find the user selection in Wordpress categories list. this is my problem. And at last, change the checkbox to Checked using "Change Attribute" - easy part !Should I use Loop? If? ...?if yes, then how? I appreciate if you help me understanding this. Quote Link to post Share on other sites
deliter 203 Posted August 17, 2016 Report Share Posted August 17, 2016 run this on Ubot 4, 5 is a bit flaky running load HTML load html("<!DOCTYPE html> <html> <body> <select> <option value=\"volvo\">Volvo</option> <option value=\"saab\">Saab</option> <option value=\"opel\">Opel</option> <option value=\"audi\">Audi</option> </select> </body> </html> ") alert($scrape attribute(<tagname="select">,"value")) I can only guess that you are trying to scrape from a dropdown,in a dropdown the current selection is the value attribute of the Select tag Quote Link to post Share on other sites
Marani 80 Posted August 17, 2016 Author Report Share Posted August 17, 2016 Thanks for your reply. But no, actually your answer it doesn't have anything to do with what I asked. I hope this picture says enough: http://uploads.im/fnRD4.png http://uploads.im/fnRD4.png Quote Link to post Share on other sites
deliter 203 Posted August 17, 2016 Report Share Posted August 17, 2016 My apologies,your question was crystal clear Quote Link to post Share on other sites
Vladislav 2 Posted August 17, 2016 Report Share Posted August 17, 2016 It should be something like this (no license serv and can not run ubot so its not the copy/paste code}: Ifcomparison#category=dogthenclick {innertext "Dog"}else ifcomparisoncategory=birdthenclick {innertext "Bird}... At least i would do it this way. probably better coders here .. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 23, 2016 Report Share Posted August 23, 2016 yes I would click this by innertext (accurate)and or element offset if they are always in the same order and categories never change (less accurate) Quote Link to post Share on other sites
Marani 80 Posted August 23, 2016 Author Report Share Posted August 23, 2016 Thank you Vladislav and TJ, It seems I'm unable to explain what the problem is, or it's very complicated. I'm going to screencast it, so you will figure out what's the problem. 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.