- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 python、chromedriver 和 Windows。我花了几个月的时间编写一个定期使用 .click() 函数的脚本,几天前它在网站上的任何地方停止工作。我一直在尝试通过 id、xpath 等找到该元素...甚至通过 send_keys(Keys.ENTER)
单击它,但没有成功。我只是想单击登录图标,但没有任何反应。似乎找到了该元素,甚至单击它,但没有任何反应。这是the site这里是代码:
browser = webdriver.Chrome(chrome_options=options, executable_path=r'chromedriver.exe')
browser.get(('https://es.wallapop.com/'))
signInButton = WebDriverWait(browser, 5).until(EC.element_to_be_clickable((By.ID, 'js-show-login-modal')))
signInButton.click()
signInButton = WebDriverWait(browser, 5).until(EC.element_to_be_clickable((By.ID, 'btn-go-login-form')))
signInButton.click()
不工作的一部分是我从终端得到的:
Traceback (most recent call last):
File "wallapop_delete.py", line 55, in <module>
signInButton = WebDriverWait(browser, 5).until(EC.element_to_be_clickable((B
y.ID, 'btn-go-login-form')))
File "C:\Users\zaico\AppData\Local\Programs\Python\Python36\lib\site-packages\
selenium\webdriver\support\wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
这就是浏览器上应该发生的情况:
最佳答案
根据您共享的网址,点击文本为Regístrate o inicia sesión的链接,您可以寻求以下任一帮助 Locator Strategies :
LINK_TEXT
PARTIAL_LINK_TEXT
CSS_SELECTOR
XPATH
以下是使用 PARTIAL_LINK_TEXT
的示例代码:
# -*- coding: UTF-8 -*-
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
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_argument('disable-infobars')
browser=webdriver.Chrome(chrome_options=options, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')
browser.get("https://es.wallapop.com/")
WebDriverWait(browser, 5).until(EC.element_to_be_clickable((By.PARTIAL_LINK_TEXT, 'strate o inicia sesi'))).click()
浏览器快照:
关于python - 通过 Expected_conditions 在元素上调用 .click() 时,selenium.common.exceptions.TimeoutException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50843483/
我是 python 和 selenium 的新手,我正在尝试我在 youtube 上看到的一个例子。这是代码示例: from selenium import webdriver from seleni
我已经使用 kafkatemplate bean 制作了发送器类来将有效负载发送到主题在 SenderConfiguration 类中进行一些配置。 发件人类 @Component public cl
这是我的第一类 UserPage。在这里您可以看到从 BasePageObject 类调用 click 方法的方法 ClickNextPage() public class UserPage exte
这个问题在这里已经有了答案: catch exception that is thrown in different thread (5 个答案) 关闭 3 年前。 如何捕获TimeoutExcep
我正在尝试使用 Ajax 加载元素。这是我的脚本: .. WebElement account= (new WebDriverWait(driver, 15)) .until(Expected
是: Future#get (FutureTask#get) ExecutorService.html#invokeAny 仅可以抛出 java.util.concurrent.TimeoutExce
编辑:我的自定义处理程序中有一个静态初始化程序 block 。当我删除它时,它运行良好。我怀疑静态初始化程序有问题。它尝试访问一些系统属性和一些 LogManager 属性。 我正在从 Eclipse
我的问题与 WCF 不时抛出的 System.TimeoutException 有关: System.TimeoutException: The open operation did not comp
我有一个 DAO 类,它有下面的方法。我在事务管理器中称其为事务管理器。当我在没有“conn.commit()”行的情况下运行它时 - 它会抛出超时异常,但是当我用这个行运行它时 - 就可以了。有什么
这是我的 DataClientFactory 类。 public class DataClientFactory { public static IClient getInstance() {
我有两个在同一网络上运行的自托管服务。第一个是对 Excel 工作表(或其他来源,但目前这是我用来测试的来源)进行抽样,并将更新发送到订阅的客户端。第二个作为客户端连接到第一个客户端的实例,可选地评估
假设您设计了一个 System.IO.Stream 扩展 MyStream,其 Read 方法可能会超时,您希望抛出哪种异常类型: System.IO.IOException(例如 System.Ne
我是 C# 的新手,我发现异常有点令人困惑...我有一个包含以下代码的网络应用程序: try { //do something } catch (TimeoutException t) {
我正在使用分布式对象进行进程间通信。我正在运行一台服务器和四个客户端实例,但我收到 NSPortTimeoutException。我想存储客户端对象@server以供客户端之间进一步通信。 //客户端
我正在测试适用于Twitter的Spring Cloud Stream App, 使用以下与Kafka相关的环境属性启动docker容器, KAFKA_ADVERTISED_HOST_NAME= ad
我正在项目中使用 JxBrowser。我只使用本地 HTML 文件,因此使用以下方法来呈现我的 HTML 文件: public static void loadHTMLFile(Browser
我使用java telegram api与windows intellij idea中的telegram core api进行通信 https://github.com/ex3ndr/telegram
我在使用 vert.x Flamework(版本:“3.8.1”)时遇到一些问题。我在运行单元测试时遇到了 java.util.concurrent.TimeoutException 。没有什么会阻塞
根据 Javadoc,Future.get() ,抛出 TimeoutException 和 CancellationException 以及另外 2 个异常。 TimeoutException 和
我之前问过一个 question在尝试从远程计算机访问 WCF 服务时解决 SecurityNegotiationException。由于 ValtasarIII 的回答,该异常已得到解决。 现在我有
我是一名优秀的程序员,十分优秀!