Unable to launch/load URL in CEF browser

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Unable to launch/load URL in CEF browser

Postby anshuDev » Sun Jul 05, 2020 5:04 am

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);
anshuDev
Newbie
 
Posts: 1
Joined: Fri Jul 03, 2020 3:11 am

Re: Unable to launch/load URL in CEF browser

Postby magreenblatt » Sun Jul 05, 2020 10:19 am

Your use of addArguments looks wrong. Compare to other examples on the forum.
magreenblatt
Site Admin
 
Posts: 10188
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 27 guests