Facing some when opening chrome browser with Selenium ChromeDriver

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
i use Selenium ChromeDriver to open chrome browser and load a site into it programmatically.

i install selenium & ChromeDrive from this NuGet

Install-Package Selenium.WebDriver -Version 3.141.0
Install-Package Selenium.WebDriver.ChromeDriver -Version 77.0.3865.4000

1) if target pc has no chrome browser install then how can i capture it by ChromeDriver ?

2) when i am opening chrome browser by ChromeDriver instance then browser is opening chrome browser with a site but another CUI window is getting opened which i do not want to visible or i want to hide this CUI window. if it is not possible then how could i open this CUI window in minimize state ?

a sample CUI window screen shot attached when i work with FirefoxDriver. the same occur when i work with ChromeDriver instance.

1492133.png

3) when i executing this code chromeDriver.Close(); then opened chrome browser is getting closed but CUI window is still open. so if i click 5 times on open button then 5 CUI window is getting open along with 5 chrome browser instance which i had to close manually ....which i do not want to manually close it rather i want to close it when browser will be closed....how to achieve it ?

4) how to capture from code that opened chrome browser is close by this code chromeDriver.Close(); or if user click on cross button of chrome browser to close it?

5) how to open a new tab in already opened chrome browser instead of opening new chrome browser. if no chrome browser is open at all then new chrome browser will be open...how to achieve it by code. this below code opening new chrome browser always....what to change there for my point 5

chromeDriver = new FirefoxDriver(options);

chromeDriver.Navigate().GoToUrl("Google");

6) another issue occur when i work with chrome driver that. it open chrome browser but a notification appear on browser like Chrome is being controlled by automated test software

i search google to hide it and found people said to use this option

options.setExperimentalOption("excludeSwitches", new String[] { "enable-automation" });

at my end this function does not available setExperimentalOption so what to do ?

please answer point wise with sample code. thanks

Continue reading...
 
Back
Top