Я пытаюсь использовать WindowsManager.closeWindow () после набора тестов. Окно закрывается, но тогда у меня ошибка. Мой код:
@Test
public void monitoringMenuTest() {
sidebar.select(Monitoring, Chart);
chartPage.checkOpened();
sidebar.select(Monitoring, Map);
mapPage.checkOpened();
sidebar.select(Monitoring, Railway);
railwayPage.checkOpened();
}
@AfterSuite(alwaysRun = true)
public void teardown() {
closeWindow();
killAllSeleniumDrivers();
}
Stacktrace:
[null STEP 06:41.504] : Close current window
[ERROR 06:46.656] : >>> java.lang.Object@6e66636a
[ERROR 06:46.659] : Failed actions chain: WindowsManager.closeWindow() > WindowsManager.originalWindow()
[06:46.661] Failed to execute 'closeWindow' for element 'WindowsManager' during '5' seconds. invalid session idBuild info: version: '4.0.0-alpha-5', revision: 'b3a0d621cc'
org.mytests.tests.example.FmsMenuTests.teardown FAILED
java.lang.RuntimeException at Exceptions.java:25
Caused by: java.lang.RuntimeException at Exceptions.java:25
Caused by: org.openqa.selenium.NoSuchSessionException at null:-1```