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
5,947 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,140 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 14, 2020 in Selenium by Gitika
• 65,770 points
103,025 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
4,142 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
3,212 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
19,296 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,500 points
13,674 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,190 points
9,143 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,910 points
7,221 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 3, 2020 in Selenium by Sri
• 3,190 points
7,874 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 6, 2020 in Selenium by Sri
• 3,190 points
16,497 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP