1

I'm trying to run a webdriver test in python on a mac (El Capitan 10.11.5). I was successful running the same test with FirefoxDriver (using FF 46, before marionette). When I try doing the same using chromedriver 2.22 or 2.20, I get a strange result - the test runs and passes, but I see no window doing it.

I'm not trying to run a headless browser - I want to see the browser.

Any ideas what's going on here?

I'm using python 2.7.11, selenium 2.53.5.

1 Answer 1

1

The browser is actually opened but it is not brought into front/focus.

There are several workarounds, like executing window.focus(), but I prefer firing up an alert() and immediately accepting it:

driver.execute_script('alert("Focus window");')) drivere.switch_to.alert.accept() 
Sign up to request clarification or add additional context in comments.

1 Comment

Simple and direct. Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.