Multiple Instances of Firefox during Selenium Webdriver Testing not handling focus correctly.

后端 未结 3 1028
春和景丽
春和景丽 2020-12-19 05:21

I have noticed that while running multiple selenium firefox tests in parallel on a grid that the focus event handling is not working correctly. I have confirmed that when ea

3条回答
  •  孤城傲影
    2020-12-19 06:04

    I've had the same issue in my continuous integration environment with Jenkins. After a long research i found an old bug in firefox that led to a new config flag to avoid those problems.

    The solution is to enable this flag on the firefox profile that the tests use. The flag is focusmanager.testmode, set it to true.

    The explanation is that the focus events are triggered only when firefox window is active. If you run multiple test you have multiple windows so only the active one triggers the focus events. With this param the events are trigered even for non active windows.

提交回复
热议问题