Chrome selenium driver - how to detach leave the browser open after the get test is completed

0 votes
       driver = {     ChromeOptions o = new ChromeOptions()
         o.addArguments('start-maximized')
         o.addArguments('browser-test')
         o.addArguments('incognito')      // this works
//       o.addArguments('utility-startup-dialog') //works.  show a dialoge on startup
             //disable automation info bar
         o.addArguments("disable-infobars");
         DesiredCapabilities capabilities = new DesiredCapabilities();
         capabilities.setCapability(CapabilityType., true);
         o.merge(capabilities);

         new ChromeDriver(o)
      }
Oct 25, 2019 in Selenium by Stephan
• 120 points
2,820 views

1 answer to this question.

0 votes

Hey Stephan, I had the similar issue with my automation script in ruby. So I used following line of code to resolve the issue. I hope you could get some hint from this command:

capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chrome_options: {detach: true})
answered Nov 4, 2019 by Abha
• 28,000 points

Related Questions In Selenium

0 votes
8 answers

How to open a link in new tab of chrome browser using Selenium WebDriver?

This below code works for me in ...READ MORE

answered Dec 13, 2020 in Selenium by Gitika
• 65,870 points
60,661 views
0 votes
1 answer

How to run Selenium test cases in Headless Chrome browser?

@Afreen to run selenium test cases in ...READ MORE

answered May 17, 2019 in Selenium by Kushal
2,570 views
0 votes
1 answer

How to capture the status change of a process in selenium, after the process is kickstarted(Run)

For your requirement of capturing and displaying ...READ MORE

answered Apr 14, 2020 in Selenium by Jake George
403 views
+1 vote
2 answers

How to get page source as it is in browser using selenium.

I needed to wait for an element ...READ MORE

answered Apr 18, 2020 in Selenium by laiman
• 330 points
6,885 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
4,622 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,010 points
5,472 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
3,300 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,010 points
3,900 views
0 votes
1 answer
0 votes
2 answers

How to avoid the pop-up window in chrome browser with Selenium?

Alert alertCancel = driver.switchTo().alert(); READ MORE

answered Sep 5, 2020 in Selenium by Sri
• 3,010 points
9,323 views