我是靠谱客的博主 无奈大白,这篇文章主要介绍python打开网页后点击网页按钮_Python:如何使用python单击网页中的按钮?,现在分享给大家,希望可以做个参考。

1586010002-jmsa.png

Below you can see a screen shot of the control group. How can I click this area using python?

m3f6c.png

解决方案

To click this area using python you need to get work with Python bindings for Selenium. Use next url to install it and url of how to use it. After getting familiar with content provided by urls above, it shouldn't be a problem to create script which click on button.

After installation of selenium your code to click that button would be quite similar to the code below:

from selenium import webdriver

driver = webdriver.Firefox()

# Go to your page url

driver.get('your page url')

# Get button you are going to click by its id ( also you could us find_element_by_css_selector to get element by css selector)

button_element = driver.find_element_by_id('button id')

button_element.click()

最后

以上就是无奈大白最近收集整理的关于python打开网页后点击网页按钮_Python:如何使用python单击网页中的按钮?的全部内容,更多相关python打开网页后点击网页按钮_Python:如何使用python单击网页中内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(55)

评论列表共有 0 条评论

立即
投稿
返回
顶部