Replies: 1 comment
-
I don't see other option, it is needed to support the new Selenium versions. I think it's good solution (using the Step to initialize a driver for those complex cases). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when you want your selenium tests to be executed in all the connected nodes in a selenium grid, you have to include a special constructor in the runner class, something like this:
This constructor executes a small sub-routine, that connects to the web page of the selenium grid, and parse all the nodes and their capabilities from the HTML page. Then, the runner class is executed as many times as nodes are connected.
This is an interesting hack, however, there's a couple of issues with this that make me consider that is not a good idea to continue supporting it:
However, we would be losing the possibility of executing the tests in all connected nodes. There's is no easy way of fixing this problem. My idea is to use an approach similar to the karate framework
https://github.com/intuit/karate/tree/master/karate-core#driver
That is, when a user executes a selenium test with the @web annotation, ginger will try to create a default driver (local chrome for example), but the user could also configure the initialization of the driver and its capabilities using a gherkin step. If we combine this with a scenario outline, we could achieve parallel execution of the test in the connected nodes (since testNG allows parallel execution in scenario outlines).
@oleksandr0001
Beta Was this translation helpful? Give feedback.
All reactions