我试图使用selenium 4来单击iframe中的一个按钮来公开隐藏的输入字段。从答案和中得到提示,我仍然无法在源站点上单击所需的投票按钮。
Python 3.10.5
进口:
import selenium.webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
from seleni
我对python这个世界很陌生,我试图在下面的网站上选择几个选项,然后单击search按钮来更新结果。然而,我无法得到按钮的回应。
我尝试使用search button.click()和.submit(),并且尝试隐式地等待。我还使用了下面的代码来等待按钮被点击。在执行代码时,它高亮显示按钮,但似乎没有释放单击;几乎就像单击了一半。
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from
我试图与需要输入用户名和密码的页面进行交互,然后单击reCAPTCHA,然后单击登录按钮。输入用户名和密码并单击reCAPTCHA可以正常工作,但是在与reCAPTCHA交互之后,登录按钮元素似乎无法被Selenium找到。问题是,在交互reCAPTCHA之前,Selenium很容易找到登录按钮元素。到底怎么回事?
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webd
我试图发送一个PNR,然后点击提交按钮。PNR被正确地填写,但是提交按钮没有被点击。因此,我在send_key()行上进行了注释,并检查提交按钮是否被单击并被单击。但是,当我发送PNR值并随后单击submit按钮时,它无法工作。
下面是相同的快照:
下面是代码:
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdrive
新来的Python。
为结帐过程创建烟雾测试。
我无法单击“继续到签出”按钮。
在“结帐”过程的“添加-Ons”页面上,我无法单击“继续到签出”按钮,该按钮允许用户转到Checkout的“参与者信息”页面。
我试过几种不同的方法。以下是最基本的尝试。
如有任何指导,将不胜感激。
import time
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from selenium.webdriver
我试图通过selenium单击一个保存按钮,但是,我得到的错误是它无法定位元素。
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome()
driver.get("xxx")
WebDriverWait(driver,10).until(EC.presence_of_elem
我试图在网页上找到“登录”按钮,然后使用"LINK_TEXT“方法单击该按钮,但是selenium似乎由于某些原因无法找到该按钮:代码:
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
try:
elem
在python中工作,selenium,Win 7,我想点击sowcomment按钮之后,它可以点击位于这个上,由wait处理,然后我想点击showmore Comments按钮来查看更多的评论,以便刮更多的评论。在第一个按钮之后,我可以提取评论。
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import selenium.common.exceptions
from selenium.webdriver.common.by import By
from
当添加用户名和密码时,它无法单击登录按钮"Inloggen“。我没有收到任何错误,但它没有点击登录按钮。
这是我的代码:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected
我正在尝试抓取这个网站:http://sekolah.data.kemdikbud.go.id/我想选择"Jenjang“字段,"SMA”值。之后,需要点击"Cari Sekolah“按钮 ? 不幸的是,我的代码不能工作。我设法选择了SMA,但无法单击"Cari Sekolah“开始查询。任何人都知道如何解决这个问题。下面是我的代码: from selenium import webdriver
from selenium.webdriver import Chrome
from selenium.webdriver.support.ui import W
我的问题如下: 脚本中指示的web页面有一个按钮("Ver todo 50"),该按钮显示表的其余记录。我使用Selenium有效地单击了按钮,但我无法获得表中的50条记录,只能获得页面最初显示的前15条记录。 有没有人有办法收集完整的日志(50)? 脚本是: from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from sel
我想单击页面上的按钮: by xpath。
我编写的示例代码如下所示:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
PATH =
我试着从网站上获取信息然后再使用.为此,我在python中使用selenium。
我到目前为止所做的是:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get('https://www.olx.ro/ofer
我正在尝试使用selenium编写一个python程序,该程序打开浏览器并执行一些操作,等待用户单击一个按钮,然后selenium再次接管。我知道我应该使用显式等待,但我不知道如何使selenium等待用户单击浏览器上的一个按钮,然后再继续我的代码。
到目前为止,以下是我的代码摘要:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium
我对Selenium非常陌生,我正试图在这个站点上构建一个刮板,点击"16. token URI“按钮,在输入字段中输入一个数字,然后单击查询按钮。但是,无论我如何定义要单击的元素,Selenium都会单击另一个按钮,即使我完全复制了XPATH。很明显,在我解决这个问题之前,我不能进入接下来的两个步骤。如何强迫Selenium向下滚动到第16个按钮并单击它?
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chr
我试图在iframe中单击一个非按钮元素(复选框),但无法使用selenium单击它。网址是,我想点击的框显示在下面的屏幕截图中:
注意:选择以下选项以到达屏幕截图中显示的屏幕:单击“新建客户”“make.model.放年”。选择Make as "NISSAN“-> Year as "2018”-> Model as "ALTIMA“-> Trim as "SL”-> Engine Type as "I4“->进入里程数为"35000”->单击底部的“继续”。在下面的页面上,目标是单击复选框维护包Standar
我对selenium有个问题:
我无法单击由我单击的第一个按钮所产生的弹出窗口中包含的按钮。
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.firefox.optio
法典审判:
from gettext import find
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
path="C:\Program Files (x86)\chromedriver.exe"
driver=webdriver.Chrome(path)
driver.get("https://targetstudy.com/school/state-board-schools-in-himachal-pradesh.html
无法让selenium单击google地图上的submit按钮。我已经能够把它输入到谷歌地图搜索栏中,但仅此而已。
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("
我使用selenium 4与python一起自动化网页。Click()方法无法工作。只有当路径具有type=submit时,才能使用submit()方法单击按钮,但不能使用单击方法选择链接。如果有人知道单击()方法单击链接的替代选项,请提供帮助。
以下是守则:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
s = Service("C:/Program Files/webdr
我用Python编写了一个脚本,以继续单击MORE按钮加载更多的项目,直到没有新的项目从网页加载。但是,下面的脚本可以单击页面底部可用的MORE按钮一次。
到目前为止,这是我的尝试:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
link =
因此,该网页有一个按钮,单击该按钮后将向网页添加一个元素,在该按钮中我无法找到使用selenium的元素。
下面是一些虚构的代码来解释我所经历的问题:
from selenium import webdriver
d = webdriver.Chrome()
#Go to my target website
d.get("https://some_website_url") #ref1
#Okay now loading of the website is done. `d` will not be updated and this is the problem!!
#Cli
我用python和selenium结合编写了一个脚本,可以单击search按钮来填充结果,然后从其登陆页面解析来自类ya_result-item的不同链接,然后继续单击next页面按钮,同时解析来自其他页面的链接,直到没有更多的按钮可单击。
但是,我的脚本只能解析来自它的第一页的链接,然后单击next页面按钮一次,然后就被卡住了。
如何使我的脚本在解析链接时继续单击下一页按钮?
这是我的尝试:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.s
我正在尝试构建一个测试,但是我似乎无法在页面HTML中找到(然后单击)一个具有唯一名称的元素。
在此之前是这样的:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWai
尝试selenium作为一个只有google身份验证的网页。当单击联接按钮时,弹出窗口就会出现,其中只有一个按钮名为sign。由于我是新来的,我不能访问弹出窗口按钮。
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait as
我对使用Python的Selenium非常陌生,我只是想在这个网站上点击两个连续的按钮:https://www.wunderground.com/history/daily/gb/manchester/EGCC/date/2017-8-28 我想单击右上角的设置图标,然后单击摄氏度选项来转换网站上的温度。 我可以在调试代码并一次执行一个步骤时实现这一点,但是当我正常运行代码时,它无法找到出现错误的第二个元素: NoSuchElementException: no such element: Unable to locate element: {"method":"xp
我试图使用selenium脚本在上发布一些东西。我能够登录并到达这个页面:使用selenium脚本的,但是在我单击post按钮之后,我无法在文本区域发送文本。
这是我的密码:
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
dri
您可以让我知道如何改进以下脚本,以实际单击导出按钮。 下面的脚本转到报告页面,但没有单击导出按钮: from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("<Path to Chrome profile>") #Path to your chrome profile
url = '<URL of the report>'
driver = webdriver.Chrome(executable_path=&