0
votes

I am getting an webDriver exception while get windowHandle.

org.openqa.selenium.WebDriverException: Unknown sessionId: 364337eb-405e-49fa-aa75-d048f10cb52c Command duration or timeout: 548 milliseconds Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700' System info: host: 'II5MACMINI-04.local', ip: '169.254.122.119', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_111' Driver info: org.openqa.selenium.remote.RemoteWebDriver Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.29.461591 (62ebf098771772160f391d75e589dc567915b233), userDataDir=C:\Users\you\AppData\Local\Temp\scoped_dir612_6018}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=58.0.3029.81, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, webdriver.remote.sessionid=364337eb-405e-49fa-aa75-d048f10cb52c, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}] Session ID: 364337eb-405e-49fa-aa75-d048f10cb52c

I am executing my test case on crossbrowsertesting.com

Here is line of code where I am getting an error.

            String parentHandle = driver.getWindowHandle(); 
1

1 Answers

0
votes

CBT disconnects your session after a certain amount of time has elapsed (somewhere around 5 mins) Try to make your tests shorter.