My selenium script work on both driver Chromedriver , IEDriver When I'm not connected to VPN.
But when i try to run same script while i'm connected to VPN It works with Chromedriver only , For IEDriver just browser open , maximized , get URL and after that all scenarios get skipped with below error.
org.openqa.selenium.NoSuchWindowException: Unable to get browser (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 17 milliseconds
Note : While Debugging i noticed that,
After getUrl() once browser window is opened, I tried to getCurrenturl() and got Following result. For IE it gives initialBrowserUrl instad of actual Url.
IEDriver logs:
[testng]Started InternetExplorerDriver server (32-bit)
[testng] 2.53.1.0
[testng] Listening on port 28196
[testng] Only local connections are allowed
[testng] Actual URL url : mydomain.com/XYZApplication/
[testng] getCurrenturl (driver.getCurrenturl): localhost:28196/
Chromedriver logs:
[testng] Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 8160
[testng] Only local connections are allowed.
[testng] test url : mydomain.com/XYZApplication/
[testng] getCurrenturl (driver.getCurrenturl) : mydomain.com/XYZApplication/