Mahbub Rahman Mahbub Rahman - 2 months ago 29
Groovy Question

Geb: Open new tab for each test

I am trying to open new tab for each iteration of the test for each set of data in the where block.

I am trying like:

setup:
Keys.chord(Keys.CONTROL, "t")


but it does not work.

How to do it?

Answer

I solved this problem by this [WRITING AT THE BEGGINING OF THE TEST]:

def cachedDriver = CachingDriverFactory.clearCacheAndQuitDriver()

Now a new window is opened and previous window is closed for every set of data in the where block and it is very helpful for executing thousands of tests.

Comments