-
Could someone share a working example for Selenium Python Framework with Parallel Execution via behavex? I tried the parallel execution via behavex and I am having issues. I tried both Feature & Scenarios in parallel but no luck. Especially environment.py file should do. just wanted to see which level the driver instance is getting created & destroyed. Your help much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @prasanmgc. We are using selenium in our project, and the fact is that you should create the selenium driver instance for every scenario in a test step that performs that action. The test scenarios should manage the selenium driver lifecycle, and within the environment.py module (maybe in the after_scenario hook) you can close the driver instance if it was previously created. |
Beta Was this translation helpful? Give feedback.
Hi @prasanmgc. We are using selenium in our project, and the fact is that you should create the selenium driver instance for every scenario in a test step that performs that action. The test scenarios should manage the selenium driver lifecycle, and within the environment.py module (maybe in the after_scenario hook) you can close the driver instance if it was previously created.
In this way, no matter if you run the tests in parallel at scenario of feature level, the execution will always work.
Also, have in mind that in general selenium does not always support multiple browser instances as is (I know it works for chrome in MacOs, but not for some other browsers), and the way to support m…