简体   繁体   English

您如何找到并单击此按钮? 使用 python 和 selenium 到 web 自动化

[英]How do you locate and click on this button? Using python and selenium to web automate

enter image description here在此处输入图像描述

I'm having trouble clicking the Sign Up Now button which seems to be different than an input type button.我在单击“立即注册”按钮时遇到问题,该按钮似乎与输入类型按钮不同。 It is also using ng-click and not sure how I can click on the button after multiple failed attempts.它还使用 ng-click 并且不确定在多次尝试失败后如何单击该按钮。

Thank you for the help!感谢您的帮助!

Try copiing the XPath and then using driver.find_element_by_xpath( copied xpath ) function for locating the element and then check this out - may help with clicking.尝试复制 XPath,然后使用 driver.find_element_by_xpath(复制 xpath ) function 以帮助定位元素然后检查。

You can select it by name as JD2775 said, if you want to read a little more about it https://selenium-python.readthedocs.io/locating-elements.html您可以按 JD2775 所说的名称 select 它,如果您想了解更多关于它的 信息 https://selenium-python.readthedocs.io/locating-elements.ZFC35FDC70AD5FC69D23EZC83

you can try with你可以试试

btn = driver.find_element_by_name('btnSignUp').click()

or或者

btn = driver.find_element_by_name('btnSignUp')
btn.click()

or something like that或类似的东西

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 selenium 和 python 找到并单击此开始按钮? - How do I locate and click this start button using selenium and python? Python Selenium Web Automation 如何单击登录按钮 - Python Selenium Web Automation How Do You Click A Login Button 如何使用python硒单击javascript按钮 - How do you click a javascript button using python selenium 如何使用 selenium python 定位按钮 - how to locate button using selenium python 如何使用 Selenium 单击 Python 中的扩展器按钮? - How do you click an expander button in Python with Selenium? 如何自动化 Selenium 以单击图像按钮 - 通过 onclick 查找元素? - Python - How to automate Selenium to click image button - find element by onclick? - Python 如何使用 Selenium 和 Python 找到并单击 codeur.com 登录页面上的提交按钮 - How to locate and click on the submit button on codeur.com signin page using Selenium and Python 如何使用带有硒的python单击Web浏览器页面中的图片按钮 - How to click on a pictorial button in web browser page using python with selenium 如何使用 Selenium 和 Python 在动态 web 表中单击可用按钮 - How to click button available in dynamic web table using Selenium and Python 使用 python 和 selenium 单击 web 页面上的按钮 - Using python and selenium to click a button on a web page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM