嗨,当我在 Windows 中尝试 Selenium 时,我遇到了上述异常,但当我在 Linux(CentO.S.)中尝试时却没有。
Sample code is shown below :
public class Simple {
WebDriver driver = new FirefoxDriver();
String baseUrl;
@Test
public void f() {
WebElement abc = driver.findElement(By.xpath("//table/tbody/tr[2]/td/table/"+
"tbody/tr[5]/td[3]/input"));
abc.sendKeys("Jaivir");
}
@BeforeTest
public void beforeTest() {
baseUrl ="http://localhost:8657/NutechDiagnostics/AcceptTest.jsp";
driver.get(baseUrl);
}
@AfterTest
public void afterTest() {
driver.quit();
}
}
baseUrl given is completely accurate. Is it the problem of browser. Please help me i
am getting stuck here for a lot of time. Thanks in advance.