kazurayam / TestClosure

Proof of Concept "TestClosure". This enables executing multiple Groovy Closures simultaneously in a Test Case in Katalon Studio.
https://forum.katalon.com/t/testclosure-executing-groovy-closures-in-test-cases-simultaneously/52436
0 stars 0 forks source link

injecting WebDriverFactory into TestClosureCollectionExecutor #3

Closed kazurayam closed 11 months ago

kazurayam commented 2 years ago

At v0.21.2, TestClosureCollectionExecutor creates an instance of WebDriver by a fixed code:

private void loadTestClosure(TestClosure tc) {
        ...
        Closure cls = {
            // open a browser window for this TestClosure
            WebUI.openBrowser('')
            WebDriver driver = DriverFactory.getWebDriver()

You can not customise the way how to create the instance of WebDriver to use.

It would be an idea that we can inject a factory class that creates WebDriver into TestClosureCollectionExecutor.

kazurayam commented 11 months ago

done at v0.22.x

However I had an issue #7, and has resolved at v0.23.x