接收两条错误消息:
package org.openqa.selenium does not exist
package org.openqa.selenium.chrome does not exist
下面是我的程序:MyClass.java
package newPackage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class MyClass {
public static void main(String
我需要修改这个代码。它附带了一条错误消息,说明 NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="login_username"]"}
(Session info: chrome=92.0.4515.159) 以下是代码 from selenium import webdriver
from selenium.
我正在尝试让selenium导入元掩码,但是当我使用xpath方法时,我的控制台返回这样的消息: no "selenium.common.exceptions.NoSuchElementException:/html/body/div[1]/div/div[3]/div/div/div/button:Unable to locate element:{"method":"xpath","selector":"/html/body/div1/div/div3/div/div/div/button"} (/html/body/
我正在尝试输入一个电子邮件地址来测试登录,但是我继续收到以下错误:no such element: Unable to locate element:
我尝试使用相对和绝对的Xpath并接收相同的错误消息。
原谅我,因为我肯定错过了一些简单的,非常新鲜的东西!
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
import time
driver = webdriver.Ch
我的代码片段
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support impo
试图让selenium选中python的一个复选框,但它似乎一直在超时。
当前代码是
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
driver = webdriver.Chrome()
driver.get('https://grabagu
我在使用Selenium时遇到了一些问题,这些元素位于一个影子DOM中。这有什么窍门吗?我做错了什么吗?
以下是我的各种尝试:
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().forBrowser('chrome').build();
driver.get('https://shop.polymer-project.org/');
// Goal is to find shop-app #shadow-root app-he
错误消息:
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: input.ytd-searchbox
尽管我从其他解决方案中添加了一个睡眠命令,以便页面动态加载javascript,但仍然找不到这个错误。
import time
from selenium import webdriver
firefox = webdriver.Firefox()
firefox.get("https://www.youtube.com")
element = fire
我是硒和蟒蛇方面的新手。我试图使用selenium查找元素,但无论我尝试了什么(xpath、CSS),我总是收到以下消息:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element
在这里,我写的代码:
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.supp
我想要一条H1短信。该页面将从“标记”转换为“HTML”。当我使用下面的代码使用XPath获取文本时:
element = driver.find_element(xpath: '/html/body/div[3]/div[1]/h1')
element.text
我正在犯错误:
<driver.find_element(xpath: '/html/body/div[3]/div[1]/h1')
Selenium::WebDriver::Error::NoSuchElementError: no such element: Unable to locate
这是我的代码的一部分: import time
from xpath_info import *
from credentials import *
from bs4 import BeautifulSoup
from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager as gdm
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException, WebD
我试图通过传入用户名和密码登录到一个网站。我使用以下代码(Python3.5):
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
url2 = 'htt
我试图在这个网站上找到用户名输入面板:这里是我使用的代码:
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
browser = webdriver.Firefox()
browser.get("http://mail.qq
我正在尝试获取一个帧,但总是得到下面的错误:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [name="esquerda"]
我的代码:
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdri
尝试用Selenium单击一个按钮,但我一直收到一个错误:
NoSuchElementException:消息:没有这样的元素:无法定位元素:{“方法”:“链接文本”,“选择器”:“同意”}
这是我想点击的按钮。
我猜弹出式弹出是很懒的。我找到了一些消息来源,但没能成功。这是我的密码
import pandas as pd
import bs4
import selenium as sel
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverW
目前正在尝试使用Selenium在'mail.com‘上自动注册。到目前为止,我已经设法让程序转到URL。我遇到的问题是,即使我复制了完整的XPATH "Sign Up“,我也得到了一个:
"selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/table/tbody/tr[114]/
我是Python的新手,我的代码有问题。我正在尝试使用Selenium by xpath进行web抓取,但是当我运行代码时,它显示了一个错误,比如"Unable to Locate element using: {"method":"xpath","selector":"//*[@id="T1"]"}。已尝试使用ID和名称作为元素,但仍不起作用。 下面是我的代码: from selenium import webdriver
from selenium.webdriver.common.keys impo
我正在尝试用python中的selenium填充这个表单:https://ing.ingdirect.es/app-login/ 使用以下代码: from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
browser = webdriver.Firefox(e
我正在尝试制作一个简单的脚本,这个脚本转到威士忌交换的主页上,点击下面的菜单项,导航到新页面,最后抓取一个截图。
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import B