Selenium Intellij 不是 运行 Testng 的测试
Selenium Intellij not running the Testng's Test
我有 selenium 网格设置和编码的 selenium testng,但它不会在前台启动浏览器。可能是什么错误?
以下是我的配置:
clean test -Dproperty=sit-config.properties
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<includes>
<include>GenericTestManager.java</include>
</includes>
</configuration>
</plugin>
@Test(groups= {"Login"}, description="Chrome - Login", dataProvider = "loginCredentials")
@JSErrorsCollectorTestNG(assertJSErrors = true)
public void test() {
myChromeDriver.getDriver().navigate().to("www.facebook.com");
}
请帮忙。
非常感谢您的帮助。
您需要在调用 navigate().to()
时包含协议,即 https
,如下所示:
myChromeDriver.getDriver().navigate().to("https://www.facebook.com/");
我将 GenericTestMnaager 重命名为 Tests.java 并且它运行了。
我有 selenium 网格设置和编码的 selenium testng,但它不会在前台启动浏览器。可能是什么错误?
以下是我的配置:
clean test -Dproperty=sit-config.properties
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<includes>
<include>GenericTestManager.java</include>
</includes>
</configuration>
</plugin>
@Test(groups= {"Login"}, description="Chrome - Login", dataProvider = "loginCredentials")
@JSErrorsCollectorTestNG(assertJSErrors = true)
public void test() {
myChromeDriver.getDriver().navigate().to("www.facebook.com");
}
请帮忙。
非常感谢您的帮助。
您需要在调用 navigate().to()
时包含协议,即 https
,如下所示:
myChromeDriver.getDriver().navigate().to("https://www.facebook.com/");
我将 GenericTestMnaager 重命名为 Tests.java 并且它运行了。