在安装了selenium模块并解压缩chromedriver_win32.zip之后,我尝试在colab上练习selenium模块。我打字,
from selenium import webdriver
driver = webdriver.Chrome()
我收到了像我的标题这样的错误消息,
Message: 'chromedriver' executable needs to be in PATH. Please see
https://sites.google.com/a/chromium.org/chromedriver/home
但我找不到任何“路径”消息来处理这种
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
dc = DesiredCapabilities.CHROME
dc['goog:loggingPrefs'] = { 'browser':'ALL' }
driver = webdriver.Chrome(desired_capabilities=dc)
driver.implicitly_wait(30)
for ent
我通过我的package.json文件安装chromedriver,它安装在我的npm_modules文件夹中。然后我把它添加到可执行文件的PATH中,当运行时终端测试都通过了。在pycharm中运行相同的命令时,表示找不到可执行文件:WebDriverException: Message: 'chromedriver' executable needs to be in PATH. 我猜我必须在pycharm中以一种特定的方式设置它。 谢谢
我正试图在一个项目中使用selenium,我还研究了其他问题,但似乎找不到解决办法。PyCharm抛出的问题在标题中。我需要的一切都是安装(Selenium)-- 3.12.0版,我已经在笔记本电脑和台式机上尝试过了,看看是否缺少了什么,但没有帮助。以下是完整的错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'selenium.webdriver' has no attribute
启动铬驱动程序时,我会得到以下错误。有什么建议吗?
package packag;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Demo2
{
public static void main (String [] args)
{
System.setProperty("webdriver.chrome.driver","C:/chromedriver.exe");
我正在尝试使用Eclipse、Selenium和chromedriver来简化网站数据的无头检索。虽然我在我的笔记本电脑上运行得很好,但我已经将一个WAR版本部署到了一个Java/Linux托管服务上,并且收到了以下错误,表明它找不到chromedriver。
类型异常报告
消息:
The driver executable does not exist: /drivers/chromedriver
描述:
The server encountered an unexpected condition that prevented it from fulfilling the request.
我正在尝试创建一个OpenQA.Selenium.Chrome.ChromeDriver实例(使用Selenium 4.0.0-字母05的v81),并使用获取实例的。我设置的唯一选项是"C:\git\Selenium\Drivers\ChromeDriver81\Win\chromedriver.exe“,它的值是,该文件是存在的。
然而,我确实明白这一点:
OpenQA.Selenium.DriverServiceNotFoundException: The chromedriver.exe file does not exist
in the current directory
运行此代码后,Chrome浏览器不会使用午餐。 我使用的是Chrome浏览器v.71.0.3578.98 (官方版本) (32位)和chrome驱动程序版本2.42 public class MainClass {
public static void main (String [] args ) {
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\Lenovo\\IdeaProjects\\Testnext\\Driv
我得到了一个类似Pycharm的错误:
Traceback (most recent call last):
File "C:/PycharmProjects/DemoPyth/PythonPack1/Prg1.py", line 3, in <module>
driver=webdriver("C:\\Python34\\Lib\\site-packages\\selenium\\webdriver\\chromedriver.exe")
TypeError: 'module' object is not call
我解决不了这个问题。我尝试了所有我能找到的解决方案,通过转到下面的地址,但问题没有解决。请帮帮我。 Chromedriver: "FileNotFoundError: [WinError 2] The system cannot find the file specified" Error 程序: from selenium import webdriver
driver = webdriver.Chrome("C:\chromedriver\chromedriver.exe")
url = 'https://www.naver.com'
d
我已经尝试设置chromedriver权限并将其标记为可执行文件。我也设置了PATH变量,但仍然得到这个错误。我还可以采取哪些其他步骤来解决此问题?我在一个EC2 Linux实例上运行Jenkins with Git。
java.lang.IllegalStateException: The driver is not executable: /var/lib/jenkins/workspace/Selenium TestNG ANT Build - Git/chromedriver.exe
at com.google.common.base.Preconditions.checkSt
尝试运行由其他开发人员编写的rspec测试。但是测试将失败,并显示以下错误
Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515
0) /media/uploader product video wistia uploads adds video when links is valid
Failure/Error: visit login_path
Selenium::WebDriver::Error::WebDriverError:
我对selenium很陌生,刚刚开始使用freecodecamp学习它,然后使用python中的以下命令下载了selenium
pip install selenium
我手动安装了镀铬网络驱动程序。将守则写成:
import os
from selenium import webdriver
os.environ["PATH"] +=r"C:/seleniumDrivers" #where the chrome driver is installed
driver = webdriver.Chrome()
运行此命令时发生下列错误:
line 81, in
我刚刚开始使用GitLab作为CI工具。我使用堆栈创建了自动测试: Java、Cucumber、Maven。我创建了带有下一个设置的gitlab-ci.yml:
image: maven:latest
stages:
- test
test:
stage: test
script:
- mvn clean test -Dtest=RunCucumberTest
但是管道失败了,下一个错误是:
java.lang.IllegalStateException: The driver is not executable: /builds/<user>/cucumb
下面的代码在过去运行得很好。几天后,我试图再次运行它,但它抛出了这样的错误。
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
public static ChromeDriver driver;
protected void initDriver(string userDataPath) {
var driverService = ChromeDriverService.CreateDefaultService(AppDomain.Curre
我的Selenium网格显示一个错误:
org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property;
但我已经完美地指定了它(据我所知)
System.out.println("googlechrome");
capability = DesiredCapabilities.chrome();
capability.setBrowserName("chrome
因此,我尝试在Atom中运行我在PyCharm中创建的脚本。在项目文件夹中,脚本与webdriver一起存在。
在写这篇文章的时候
driver = webdriver.Chrome()
我明白了
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
我只在Atom上得到了这个。它在Pycha
我用Selenium编写了一个单元测试。单元测试类有一些(工作)单元测试。构造函数如下所示:
private IWebDriver _chrome;
public SeleniumTest()
{
_chrome = new ChromeDriver();
}
当我使用Test在测试类中运行一个时,一切都可以很好地工作。
但是,当我创建一个包含相同单元测试的有序测试时,当我尝试启动ChromeDriver时,我会收到一个错误:
OpenQA.Selenium.DriverServiceNotFoundException was unhandled by user code
当我把我的代码放进去的时候,我无法让chromium运行,理论上它看起来应该可以工作,我甚至遵循了教程,但是我总是得到同样的错误信息。这是我放入的代码:
from selenium import webdriver
#chromedriver varible with exact location to where its saved
chromedriver = "/home/jackmiller/Downloads/chromedriver"
#varible of drive to run open up the chrome driver which is loca
我正在尝试使用Selenium WebDriver Chrome打开一个网站,但还没有达到,因为我的代码一直产生错误。
我正在使用Pycharm。我想知道为什么会发生这种情况,以及修复它的方法。
错误是:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'driver' is not defined
这是我的代码:
from selenium import webdriver
Browser = driver