Page 1 of 1

Unable to launch/load URL in CEF browser

PostPosted: Sun Jul 05, 2020 5:04 am
by anshuDev
Hi ,

I searched all posts here in this forum and I can successfully launch the browser(cefclient.exe) , but I cannot load the URL i want to open. It always open the Google site.
Any help on this is appreciated.

Thanks in advance. Below I have added my code.

System.setProperty("webdriver.chrome.driver", "C:\\Users\\amohapa\\Documents\\chromium_app\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.exe remote-debugging-port=12345--user-data-dir=remote-profile");
options.setBinary("C:\\Users\\amohapa\\Downloads\\cef binary 72\\cef72\\cef_binary_3.3626.1895.g7001d56_windows64_client\\Release\\cefclient.exe");
System.out.println("after remote debgging");
WebDriver driver = new ChromeDriver(options);
System.out.println("test1");
Thread.sleep(2000);
System.out.println("test1 after 5000");
driver.manage().window().maximize();
System.out.println("test1 after maximize");
driver.get("https://XXXXX/login/");
driver.switchTo().alert().accept();
Thread.sleep(1000);
driver.findElement(By.id("username")).sendKeys("s6824tx1")
driver.findElement(By.id("password")).sendKeys("q1q1q1q1");
Thread.sleep(2000);

Re: Unable to launch/load URL in CEF browser

PostPosted: Sun Jul 05, 2020 10:19 am
by magreenblatt
Your use of addArguments looks wrong. Compare to other examples on the forum.