Selenium ChromeDriver issue - Want to run it in background, but not as headless browser

0 votes
I am looking for a way to run selenium tests in the background with ChromeDriver. With the background I mean as in, not the foreground focussed window. I can actually do this, but as soon as actions like opening a new tab or switching between windows (so basically switching window handles) happen in ChromeDriver, the browser window gets pushed to the foreground.

So my question is, how can I prevent this from happening without running the test headless?

Any suggestions are appreciated, open for discussion
Mar 26, 2018 in Selenium by nitinrawat895
• 10,950 points
3,497 views

1 answer to this question.

0 votes
This is a flaw with ChromeDriver. Tried doing the same with Firefox, and it worked for me. If you still want to use ChromeDriver, use a VM or a remote computer and attach to the process remotely to do the debugging if needed.
answered Mar 26, 2018 by nsv999
• 5,510 points

@nsv999, can't we use Ctrl+Tab keyboard action to put the browser window in background? 

Related Questions In Selenium

0 votes
0 answers

How to configure ChromeDriver to initiate the browser in the Headless mode using Selenium?

I'm currently working on a Python script ...READ MORE

Apr 2, 2019 in Selenium by Surya
• 970 points
570 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
1,911 views
0 votes
1 answer
+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 in Selenium by laiman
• 330 points
2,022 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,510 points
3,536 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31 in Selenium by Sri
• 2,970 points
4,542 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
2,598 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 in Selenium by Sri
• 2,970 points
2,865 views
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,930 points
718 views
0 votes
1 answer

Headless ChromeDriver using Python Selenium error: Fails To Start— “DevTools request failed”

This should be because your ChromeDriver is ...READ MORE

answered Mar 29, 2018 in Selenium by nsv999
• 5,510 points
694 views