Mahbub Rahman Mahbub Rahman - 1 year ago 135
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:

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

but it does not work.

How to do it?

Answer Source

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.