In ChromeDriver class some methods ( findBymethod, navigate) are not found by IDE… using jdk14…took code from git repo… & pasted,…
package io.testproject.sdk.tests.examples.simple;
import io.testproject.sdk.DriverBuilder;
import io.testproject.sdk.drivers.web.ChromeDriver;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeOptions;
public final class WebTest {
public static void main(final String[] args) throws Exception {
// ChromeDriver driver = new ChromeDriver(new ChromeOptions());
ChromeDriver driver = new DriverBuilder<ChromeDriver>(new ChromeOptions())
.withRemoteAddress(new URL("http://localhost:8585"))
.withToken("MyTokenhere")
.build(ChromeDriver.class);
driver.navigate().to("https://example.testproject.io/web/");
driver.findElement(By.cssSelector("#name")).sendKeys("John Smith");
driver.findElement(By.cssSelector("#password")).sendKeys("12345");
driver.findElement(By.cssSelector("#login")).click();
boolean passed = driver.findElement(By.cssSelector("#logout")).isDisplayed();
if (passed) {
System.out.println("Test Passed");
} else {
System.out.println("Test Failed");
}
driver.quit();
}
}