eeellama 0 Posted August 1, 2016 Report Share Posted August 1, 2016 Does anyone know if it is possible for uBot to detect user interaction with a web page? Let's say that we have a script that we're waiting for the user to click in a drop-down (or some other control) and make a selection. Is it possible to "see" that and store their choice in a variable? Quote Link to post Share on other sites
deliter 203 Posted August 1, 2016 Report Share Posted August 1, 2016 yes,a few ways of doing it This will add an onChange attribute to the dropdown,so you can add it to a random web page that your bots navigates to,remember that onChange is only available for a few different HTML elements,you can do stuff with onClick etc,other then that you would need to write Javascript load html("<!DOCTYPE html> <html> <body> <select> <option value=\"\"></option> <option value=\"volvo\">Volvo</option> <option value=\"saab\">Saab</option> <option value=\"opel\">Opel</option> <option value=\"audi\">Audi</option> </select> </body> </html> ") change attribute(<tagname="select">,"onChange","ubot.runScript(\'doSomething()\')") define doSomething { alert($scrape attribute(<tagname="select">,"value")) } Quote Link to post Share on other sites
eeellama 0 Posted August 2, 2016 Author Report Share Posted August 2, 2016 Excellent. Thanks so much! 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.