bonigarcia / webdrivermanager

Automated driver management and other helper features for Selenium WebDriver in Java
https://bonigarcia.dev/webdrivermanager/
Apache License 2.0
2.58k stars 676 forks source link

org.openqa.selenium.NoSuchWindowException: Currently focused window has been closed #270

Closed aneesforgit closed 5 years ago

aneesforgit commented 6 years ago

Hi,

I am using a framework having Geb+cucumber+groovy as the components. When I try to run for Chrome with the below code in GebConfig.groovy its working fantastically. But when I try to run Edge and IE its throwing below errors. Attaching file for each browser with error details

Working fine: WebDriverManager.chromedriver().setup() driver = { def driver = new ChromeDriver() driver.manage().window().maximize() return driver }

bonigarcia:webdrivermanager version used in gradle is testCompile("io.github.bonigarcia:webdrivermanager:2.2.4") { exclude group: 'org.seleniumhq.selenium' }

Not working:

WebDriverManager.iedriver().setup() driver = { def driver = new InternetExplorerDriver() driver.manage().window().maximize() return driver }

WebDriverManager.edgedriver().setup() driver = { def driver = new EdgeDriver() driver.manage().window().maximize() return driver }

WebDriverManager.firefoxdriver().setup() driver = { WebDriver driver = new FirefoxDriver() driver.manage().window().maximize() return driver }

Error for FF.txt Error for IE.txt Error for Edge.txt

bonigarcia commented 5 years ago

This is not a WebDriverManager issue.