Skip to content

NoSuchSessionException thrown after tests if Configuration.chromeOptions is set and close() is called #56

@aakacenoks

Description

@aakacenoks

TestUI Version:
v1.2.5

Platform
Desktop chrome (macOS)

Steps
Given I set chrome options via Configuration static variable

HashMap<String, Object> chrOptions = new HashMap<>();
chrOptions.put("profile.default_content_settings.popups", 0);
options.setExperimentalOption("prefs", chrOptions);
Configuration.chromeOptions = options;

And I call close(); after each cucumber scenario in After hook
Then sessions are closed after each scenario without errors

Results
Exception is thrown after all scenarios are executed.

If close(); is not called in After hook, then chrome sessions are stacking until all scenarios are finished. Then they are all closed without exception.

This does not affect the test results.

Console log

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'MBP.local', ip: 'fe80:0:0:0:67:1531:c0e3:6694%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.4', java.version: '1.8.0_231'
Driver info: driver.version: RemoteWebDriver
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:125)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
	at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:442)
	at java.lang.Thread.run(Thread.java:748)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions