I am new with selenium java. I wrote my first code to open a page using web driver, the browser chrome opened without content
public class WebdriverDemo {
public static void main(String[] args) {
String url = "http://www.google.com";
WebDriver driver = new ChromeDriver();
driver.get(url);
//i tried driver.navigate().to(url); either but it's not working the same result !!
}
}
Just add this part of code:
ChromeOptions optionss=new ChromeOptions();
optionss.addArguments("--remote-allow-origins=*");
WebDriver driver=new ChromeDriver(optionss);