I'm using Python's module Spynner for creating a Social Network application, one of the features is being able to create a Tumblr account directly in the application without loading a web browser. Using the ability to run javascript code in the browser, I'm attempting to click a dynamic button, except any idea I use doesn't seem to click it at all. The button's code looks like this, nice and simple.
<button id="signup_forms_submit">
<span class="account_btn">Démarrer</span>
<span class="birthday_btn">Suivant</span>
<span class="captcha_btn"><span>Terminé !</span></span>
<span class="login_btn">Connexion</span>
</button>
I've tried the following with no results, the button just won't click.
browser.runjs("""$(document.elementFromPoint(393, 373)).click(); """)
browser.runjs("""$('.account_btn').click();""")
browser.click("input[id=signup_forms_submit]", wait_load=True, timeout=30)
I'm honestly stuck. Any help is apprecieated.
Set confirm callback before clicking an element:
https://pythonhosted.org/spynner/spynner.browser.Browser-class.html#set_javascript_confirm_callback
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.