我有一个问题,当我使用sbt运行con conlenide时,测试失败,但是我使用IDE intellij运行测试,测试是完美的。
这是sbt依赖项:
libraryDependencies ++= Seq(
"io.vavr" % "vavr" % "0.9.2",
"junit" % "junit" % "4.12" % "test",
"com.novocode" % "junit-interface" % "0.11" % "test",
//"org.projectlombok"%"lombok"%"1.16.16",
"org.mockito"%"mockito-core"%"2.8.9"%"test",
"org.powermock"%"powermock-api-mockito2"%"1.7.3"%"test",
"org.powermock"%"powermock-module-junit4"%"1.7.4"%Test,
"org.seleniumhq.selenium" % "selenium-java" % "3.13.0" % "test",
"com.codeborne" % "selenide" % "4.2.1",
"io.cucumber"%"cucumber-core"%"2.0.1",
"io.cucumber" % "cucumber-junit"%"2.3.1"
)
这是我的课堂测试:
public class TestSelenide {
@Before
public void configurarNavegador()
{
System.setProperty("webdriver.chrome.driver","/home/s4n/practicaAutomatizacion/chromedriver");
System.setProperty("selenide.browser", "Chrome");
}
@Test
public void enviarCorreo()
{
open("https://mail.google.com/mail/u/0/#inbox");
$("#identifierId").setValue("juliancarvajal@seven4n.com").pressEnter();
}
}
感谢所有人:)