Skip to main content
replaced http://sqa.stackexchange.com/ with https://sqa.stackexchange.com/
Source Link

Each time main is run a new driver is created. The if-then-else is then used, but it is with a new driver each time. after each use driver.close(); closes the tab

Try creating a program structure that creates the driver once and then has methods that reuse that driver without closing it between tests.

See also http://sqa.stackexchange.com/a/1993/8992https://sqa.stackexchange.com/a/1993/8992

Each time main is run a new driver is created. The if-then-else is then used, but it is with a new driver each time. after each use driver.close(); closes the tab

Try creating a program structure that creates the driver once and then has methods that reuse that driver without closing it between tests.

See also http://sqa.stackexchange.com/a/1993/8992

Each time main is run a new driver is created. The if-then-else is then used, but it is with a new driver each time. after each use driver.close(); closes the tab

Try creating a program structure that creates the driver once and then has methods that reuse that driver without closing it between tests.

See also https://sqa.stackexchange.com/a/1993/8992

Source Link
Michael Durrant
  • 25.2k
  • 3
  • 41
  • 113

Each time main is run a new driver is created. The if-then-else is then used, but it is with a new driver each time. after each use driver.close(); closes the tab

Try creating a program structure that creates the driver once and then has methods that reuse that driver without closing it between tests.

See also http://sqa.stackexchange.com/a/1993/8992