Bowser Not Opened Exception

Hi,

I am having a scenario where a single test case is rung for multiple sets of data.
So i have iterated the single test case in a for loop.
The code looks similar to this:

for (int rows=1;rows< 8;rows++){
WebUI.openrowser()
WebUI.navigateToUrl(‘someURL’)
—preform operations—

WebUI.closeBrowser
}

I have the code in for loop for killing the chromebrowser and driver in task manager.

When i run in for loop trying to close and open browser , i am unable to open browser.Eventually leading to failure of my test case

Could someone help me on this.

Thanks in advance!!!

Thanks,
Udaya Bhaskar

Hi,

can you share full exception and also full test script would be great. Thanks.

Hi,

Sorry ,I should not place the code.

Here is the exception:

Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.e[0;39m
e[31mBuild info: version: ‘3.7.1’, revision: ‘8a0099a’, time: '2017-11-06T21:07:36.161Z’e[0;39m
e: ‘amd64’, os.version: ‘6.1’, java.version: '1.8.0_181’e[0;39m
e[31mDriver info: driver.version: CChromeDriver)e[0;39m
Jun 07, 2019 1:41:39 PM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)

Thanks,
Udaya Bhaskar

Well, I have similar problem, I can’t run it in Chrome browser and Mozilla Firefox, but I can run it in a IE.
But this helped me, now I can run it without any problmes.

System.setProperty('webdriver.chrome.driver', 'PATH\chromedriver.exe')
WebDriver driver = new ChromeDriver()
DriverFactory.changeWebDriver(driver)
driver.get('https://www.google.com')

Hi,

This solution could resolve my issue.

But when using this code, i am not able to see the option to run on Active Browser when the test case fails.

Could that be resolved too?

Thanks,
Udaya Bhaskar

Hi ,

Please find the exception : Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:12609 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connecte[0;39m
e[31mBuild info: version: ‘3.7.1’, revision: ‘8a0099a’, time: '2017-11-06T21:07:36.161Z’e[0;39m
e[31mSystem info: host: ‘VW7MSPTCSP8006’, ip: ‘10.12.237.39’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: '1.8.0_181’e[0;39m
e[31mDriver info: driver.version: RemoteWebDriver)e[0;39m
2019-06-20 15:21:25.185 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[31m❌ openBrowser(“”) FAILED.e[0;39m
e[31mReason:e[0;39m
e[31mcom.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:12609 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connecte[0;39m
e[31mBuild info: version: ‘3.7.1’, revision: ‘8a0099a’, time: '2017-11-06T21:07:36.161Z’e[0;39m
e[31mSystem info: host: ‘VW7MSPTCSP8006’, ip: ‘10.12.237.39’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: '1.8.0_181’e[0;39m
e[31mDriver info: driver.version: RemoteWebDriver)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser$0.call(Unknown Source)e[0;39m
e[31m at RST_Login.run(RST_Login:33)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:80)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)e[0;39m
e[31m at RST_Account Search.run(RST_Account Search:32)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:80)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)e[0;39m
e[31m at TC_70_RST_PrintValidations.run(TC_70_RST_PrintValidations:30)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)e[0;39m
e[31m at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)e[0;39m
e[31m at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)e[0;39m
e[31m at TempTestSuite1561023753228.run(TempTestSuite1561023753228.groovy:36)

another Exception :Jun 20, 2019 3:38:31 PM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
2019-06-20 15:38:31.152 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain -e[0;39m e[31m❌ Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.e[0;39m
e[31mBuild info: version: ‘3.7.1’, revision: ‘8a0099a’, time: '2017-11-06T21:07:36.161Z’e[0;39m
e[31mSystem info: host: ‘VW7MSPTCSP8006’, ip: ‘10.12.237.39’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: '1.8.0_181’e[0;39m
e[31mDriver info: driver.version: CChromeDriver)e[0;39m
2019-06-20 15:38:31.186 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[31m❌ openBrowser(“”) FAILED.e[0;39m
e[31mReason:e[0;39m
e[31mcom.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.e[0;39m
e[31mBuild info: version: ‘3.7.1’, revision: ‘8a0099a’, time: '2017-11-06T21:07:36.161Z’e[0;39m
e[31mSystem info: host: ‘VW7MSPTCSP8006’, ip: ‘10.12.237.39’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: '1.8.0_181’e[0;39m
e[31mDriver info: driver.version: CChromeDriver)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser$1.call(Unknown Source)e[0;39m
e[31m at RST_Login.run(RST_Login:34)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:80)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)e[0;39m
e[31m at RST_Account Search.run(RST_Account Search:32)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:80)e[0;39m
e[31m at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)e[0;39m
e[31m at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)e[0;39m
e[31m at TC_70_RST_PrintValidations.run(TC_70_RST_PrintValidations:30)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)e[0;39m
e[31m at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)e[0;39m
e[31m at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:149)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)e[0;39m
e[31m at TempTestSuite1561025013026.run(TempTestSuite1561025013026.groovy:36)

Test script:

try {
Runtime.getRuntime().exec(‘taskkill /F /IM chromedriver.exe’)
Runtime.getRuntime().exec(‘taskkill /F /IM chrome.exe’)
}
catch (Exception e) {
}
WebUI.delay(10)
WebUI.openBrowser(‘’)
WebUI.navigateToUrl(GlobalVariable.URL_Login)
WebUI.maximizeWindow()

The above test script is called for opening a new Browser.

Chrome Custom Capabilities:

Could someone help me resolve this issue.

Thanks,
Udaya Bhaskar