Follow

How can I switch to another driver during same test case execution

In some exceptional changes, it may be required to change the driver.

To change the desired capabilities during test execution, you need to call the setup method of WebDriverTestBase class as below.

For example if you want to switch to appiumDriver while executing on any other driver, call the following steps.


            String[] desiredCaps =
                    STBArgs.base_url.set(
                            "http://localhost:4723/wd/hub",
                            STBArgs.port.set("4723",
                                    STBArgs.browser_str.set("appiumDriver")));

            new WebDriverTestBase().setUp(null, desiredCaps);

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk