我是靠谱客的博主 无奈大白,最近开发中收集的这篇文章主要介绍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单击网页中的按钮?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部