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
226 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
• 27,760 points

Related Questions In Selenium

0 votes
5 answers
0 votes
1 answer
0 votes
2 answers

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

You first need to download chrome driver ...READ MORE

answered Aug 26, 2019 in Selenium by Abha
• 27,760 points
394 views
0 votes
1 answer
0 votes
1 answer

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,510 points
1,555 views
0 votes
1 answer
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,870 points
1,492 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,870 points
1,271 views
0 votes
1 answer

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

Hi Naresh, its actually pretty easy to ...READ MORE

answered Oct 10, 2019 in Selenium by Abha
• 27,760 points
1,527 views