Protractor brings window to foreground - solved
Web is full of questions "Protractor brings browser window to foreground, how to minimize it". Most of the answers are "this is default behaviour when taking screenshots from tests, you can do nothing if you are using Windows" (and headless browsers solution for testing on Linux).
I have a very strange (well, at least haven't read it anywhere yet) story regarding the issue. I've been using Protractor since November, running my local tests on Windows 10, taking screenshots after each test with no issues. I was able to start long run of tests, minimize the browser window to background and continue working while tests were running.
Suddenly this behaviour changed a few weeks ago. We've updated chromedriver almost at the same time, so thought it might be related. Googled a bit, found those "you cannot do anything about this answers" and decided "well, they finally fixed some bug and I'm experiencing what I've should from the very beginning. Sad but I have to live with this".
One day I've mentioned this issue to my colleague and asked how he's dealing with it. He looked at me astonished and said he had no such issues. That sounded strange - we are working on the same project, using same configuration. Double checked Chrome browser versions - as mine was a bit older, updated to match them. Problem on my computer wasn't solved. Uninstalled Chrome, reinstalled - problem not solved. Strange, but again decided "have to live with this".
This week I've been working from my home for some time, using same laptop. Suddenly I've noticed that no "browser always takes focus" problem exits. Back to work - problem appeared again...
The only difference I managed to find - at home I'm using another model of external monitor connected to my laptop. So one more experiment - I've downloaded native display drivers from monitor manufacturer (dated 2015 if I remember correctly) and installed them instead of those "good brand new" found by Windows 10.
Reboot -- and my problem was solved! No more browser taking focus for the rest of the week. I can minimize it and continue working while tests are running. Have no idea which Windows update messed something up, have no idea whether those custom drivers will be replaced by "better" ones. Anyway, I can reinstall them once a week if this will be necessary :D Maybe this long post will help someone (laptop - Dell, external monitors - Dell both at work and home).
I have a very strange (well, at least haven't read it anywhere yet) story regarding the issue. I've been using Protractor since November, running my local tests on Windows 10, taking screenshots after each test with no issues. I was able to start long run of tests, minimize the browser window to background and continue working while tests were running.
Suddenly this behaviour changed a few weeks ago. We've updated chromedriver almost at the same time, so thought it might be related. Googled a bit, found those "you cannot do anything about this answers" and decided "well, they finally fixed some bug and I'm experiencing what I've should from the very beginning. Sad but I have to live with this".
One day I've mentioned this issue to my colleague and asked how he's dealing with it. He looked at me astonished and said he had no such issues. That sounded strange - we are working on the same project, using same configuration. Double checked Chrome browser versions - as mine was a bit older, updated to match them. Problem on my computer wasn't solved. Uninstalled Chrome, reinstalled - problem not solved. Strange, but again decided "have to live with this".
This week I've been working from my home for some time, using same laptop. Suddenly I've noticed that no "browser always takes focus" problem exits. Back to work - problem appeared again...
The only difference I managed to find - at home I'm using another model of external monitor connected to my laptop. So one more experiment - I've downloaded native display drivers from monitor manufacturer (dated 2015 if I remember correctly) and installed them instead of those "good brand new" found by Windows 10.
Reboot -- and my problem was solved! No more browser taking focus for the rest of the week. I can minimize it and continue working while tests are running. Have no idea which Windows update messed something up, have no idea whether those custom drivers will be replaced by "better" ones. Anyway, I can reinstall them once a week if this will be necessary :D Maybe this long post will help someone (laptop - Dell, external monitors - Dell both at work and home).
Comments
Post a Comment