【发布时间】:2020-03-13 07:52:13
【问题描述】:
我在 Eclipse 中运行以下代码,但我的 Google Chrome 没有启动。
配置如下:
- 面向 Java 开发人员的 Eclipse IDE
- 版本:2019-12 (4.14.0)
- 已采用最新版本的 GC 驱动程序。
相同的代码和配置适用于另一台笔记本电脑,但不适用于我的笔记本电脑。已经重新安装了几次应用程序。 互联网上所有可用的库也已导入。
package automationFramework;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.*;
public class FirstTestCase {
public static WebDriver driver;
public static void main(String[] args) {
System.setProperty("webdriver.firefox.driver", "C:\\Users\\WC-Parul\\Downloads\\geckodriver-v0.26.0-win64.zip");
FirefoxDriver driver = new FirefoxDriver();
driver.get("https://www.google.com/");
// Launch the Online Store Website
// driver.get("http://www.shop.demoqa.com");
// Print a Log In message to the screen
System.out.println("Successfully opened the website www.Store.Demoqa.com");
// Close the driver
// driver.quit();
}
}
【问题讨论】:
标签: java selenium selenium-webdriver automated-tests