nosuchelementexception 相关问题

如果您的问题是由Java引起或主要涉及NoSuchElementException,请使用此标记。

org.openqa.selenium.NoSuchElementException Appium 与 webview 上下文

我们正在使用 Appium for Android 应用程序创建自动测试。我们的应用程序有一些网页视图页面。 重定向到 webview 页面后 - 我更改了上下文,但仍然无法使用 webview 元素。 ...

回答 1 投票 0

流迭代列表上出现 NoSuchElementException<Object>

嗨! 尝试使用此流,但我得到了 NoSuchElementException var 分数 = findAllByBarcode 。溪流() .iterator() 。下一个() .

回答 1 投票 0

在 AVL 树的删除方法中使用 NoSuchElementException 时遇到问题

我正在尝试创建一个删除方法,从 AVL 树中删除节点。但是测试我的代码的程序给我一个错误,说我没有正确使用 NoSuchElementException 。 这里...

回答 1 投票 0

使用Chromedriver下载一些excel文件时遇到NoSuchElementException和TimeoutException

我在通过 chromedriver 下载一些 excel 文件时使用执行脚本时使用 XPATH 和 TimeoutException 时遇到 NoSuchElementException 。 我试图在网站上单击 Ke...

回答 1 投票 0

如何迭代并将 Text.txt 中的下一行打印到 NetBeans 中的输出控制台?

我试图从文本文件中读出我的文本注释,但由于 NoSuchElementException,它似乎无法迭代到下一行代码。我该如何解决? 我提前道歉,你...

回答 1 投票 0

如何使用try-except来跳过selenium无法使用Selenium和Python定位元素的情况

我的问题是如何使用try-expect来跳过selenium无法定位元素的情况。 由于某些原因,我不得不跳过上面描述的情况。我想使用 try-expect,但我不会...

回答 1 投票 0

无论我对代码做什么,nextInt() 中都会出现 NoSuchElementException

公共类最小元素{ 公共无效readIntegers(int userCount){ int 计数 = 用户计数; int intArray[] = new int[count]; 扫描仪扫描 = new Scanner(System.in); 对于 (int i =...

回答 1 投票 0

org.openqa.selenium.NoSuchElementException:没有这样的元素

运行 Selenium WebDriver 2.37.1 我在运行测试时遇到间歇性问题并收到以下错误: org.openqa.selenium.NoSuchElementException:没有这样的元素 有时...

回答 9 投票 0

如果 Appium 中没有 text 或 content-desc 作为该元素的属性,如何滚动到具有 resourceId 或 id 的元素

我正在尝试执行此脚本,但滚动功能不起作用,我已经重新检查了resourceId,它是正确的,并且此方法在与文本(“”)一起使用时有效...

回答 3 投票 0

如何访问 protonmail.com 上 iframe 内的消息字段?

我正在尝试在 Protonmail 服务器上使用 Python Selenium 发送电子邮件。一切正常,直到我收到电子邮件为止。 要访问电子邮件消息字段,我使用以下 xpath: &q...

回答 1 投票 0

如何访问 protomail.com 上 iframe 内的消息字段?

我正在尝试在 protonmail 服务器上使用 python selenium 发送电子邮件。一切正常,直到我收到电子邮件为止。 要访问电子邮件消息字段,我使用以下 xpath: &q...

回答 1 投票 0

唯一元素没有此类元素例外

我正在尝试在 protonmail 服务器上使用 python selenium 发送电子邮件。一切正常,直到我收到电子邮件为止。 要访问电子邮件消息字段,我使用以下 xpath: &q...

回答 1 投票 0

Python Selenium 使用 CLASS_NAME 选择器时无法定位元素 [NoSuchElementException]

当我尝试使用find_element(By.CLASS_NAME, 'classname')时,它总是返回NoSuchElementException,无法定位元素。 但是当我在同一个元素上使用 ID 和 NAME 时,它起作用了!只有

回答 1 投票 0

短信缩写解码器:NoSuchElementException

我需要帮助开发我正在尝试组装的短信缩写解码器。程序的第一部分应该这样做:“如果用户的输入字符串与已知的文本消息缩写匹配......

回答 2 投票 0

为什么我在 Appium+ Flutter Automation 代码中遇到 No such element found 错误?

我是使用 appium 进行颤振自动化的新手。我遵循了互联网上的例子。但它给了我没有找到这样的元素错误。基本上我试图用 ValueKey、Sementic 来识别元素...

回答 1 投票 0

Iterator Item Reader 的 Spring 批处理多线程问题

我是 Spring Batch 的新手,仍在学习,我使用 IteratorItemReader 、自定义处理器和自定义编写器进行批量配置,如下所示, @Autowired JobBuilderFactory jobBuilderFactory; @Autowi...

回答 1 投票 0

使用 Selenium 和 ChromeDriver 时,堆栈跟踪错误中的 Backtrace: Ordinal0 [0x00723AB3+2505395] 意味着什么

我对编码比较陌生,对堆栈跟踪错误有点不熟悉。 我收到此错误,但我不确定要修复代码的哪一部分?错误来了吗 因为

回答 2 投票 0

Python Selenium NoSuchElementException 尽管元素在那里

我试图构建一个网络爬虫,但我尝试选择一个 select-element() 但 Selenium 无法找到该对象并抛出异常。 我使用 find_element 与正确的...

回答 1 投票 0

Python Selenium:NoSuchElementException:消息:没有这样的元素:无法找到元素:

我有一个需要登录的网站: 'https://gb.clientportal.dunnhumby.com/bkr' 我正在使用 Selenium 这样做。检查页面时,登录输入字段具有以下属性: 我有一个需要登录的网站: 'https://gb.clientportal.dunnhumby.com/bkr' 我正在使用 Selenium 这样做。检查页面时,登录输入字段具有以下属性: <input id="userNameInput" name="UserName" type="email" value="" tabindex="1" class="text fullWidth" spellcheck="false" placeholder="[email protected]" autocomplete="off"> 我会使用以下内容: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = webdriver.Chrome() driver.get('https://gb.clientportal.dunnhumby.com/bkr') username = driver.find_element(By.CSS_SELECTOR,"#userNameInput") username.send_keys('test_user') 它返回一个错误:NoSuchElementException 我试图通过所有可能的选项来查找元素:id、name - 一切都会出错。 然后我尝试等待: driver = webdriver.Chrome() driver.get('https://gb.clientportal.dunnhumby.com/bkr') wait = WebDriverWait(driver, 10) username_field = wait.until(EC.visibility_of_element_located((By.XPATH, '//input[@id="userNameInput"]'))) 错误是TimeoutException: Message: Stacktrace:Backtrace: 就像即使在等待元素仍然没有找到一样。 然后我尝试检查 iframe,但是那个 URL 上没有 iframe。 driver.find_element(By.TAG_NAME, "iframe") NoSuchElementException: Message: no such element: Unable to locate element: {"method":"tag name","selector":"iframe"} 还有什么我可以尝试的想法吗? 谢谢 有一个 FRAME,其中包含所需的元素。您首先需要切换到 FRAME,然后执行操作。参考下面的工作代码: driver.get("https://gb.clientportal.dunnhumby.com/bkr") wait = WebDriverWait(driver, 10) wait.until(EC.frame_to_be_available_and_switch_to_it((By.XPATH, "(//frame)[1]"))) username = driver.find_element(By.CSS_SELECTOR,"#userNameInput") username.send_keys('test_user') 需要进口: from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC 结果: 使用 FRAME 执行操作后,您可以使用以下代码切换回主要内容: driver.switchTo().defaultContent(); 以下是FRAME的HTML,供您参考:

回答 1 投票 0

Assert that a webelement is not present - 快速解决方案?

我需要在我的测试中多次断言一个网络元素不存在。我已经在网站上搜索过这个,并在答案中找到了我的代码中已有的内容: 尝试{ WebElem...

回答 4 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.