【发布时间】:2017-05-17 09:19:40
【问题描述】:
我尝试运行简单的 Java Selenium 代码,但出现此错误 - 谁能帮我解决这个问题?
import org.openqa.selenium.*;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class test
{
public static void main(String[] args)
{
stem.setProperty("webdriver.chrome.driver","D:/apache-jmeter-3.1/bin/chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com/");
String Title = driver.getTitle();
//compare the actual title of the page with the expected one
if (Title.contentEquals("Google"))
{
System.out.println("Test Passed!");
}
else
{
System.out.println("Test Failed");
}
driver.close();
}
}
【问题讨论】:
-
表示网址无效。网址是什么?
-
我已将链接传递为 driver.get("google.com");
-
看来你写的是 'stem' 而不是 'System'
标签: java selenium automation jmeter jmeter-plugins