Unable to open browser with url: '' ... No driver is set for execution

staff-19

#1

I use Katalon Studio 6.1.2 on Windows10.

I made a test case.

import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

println "DriverFactory.getExecutedBrowser()=${DriverFactory.getExecutedBrowser()}"

WebUI.openBrowser('')

WebUI.navigateToUrl('http://demoaut.katalon.com/')

WebUI.delay(3)

WebUI.closeBrowser()

When I clicked Green Run button GreenRunButton without explicitly specifying which browser to use*, I got the following error in the log view:

05-07-2019 03:26:02 午後 Test Cases/QMW/visitSite

Elapsed time: 0.705s

Test Cases/QMW/visitSite FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ''
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser.call(Unknown Source)
	at visitSite.run(visitSite:6)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:336)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:327)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:306)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:298)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:232)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1557210360662.run(TempTestCase1557210360662.groovy:21)
Caused by: com.kms.katalon.core.exception.StepFailedException: No driver is set for execution.
	at com.kms.katalon.core.webui.driver.DriverFactory.startNewBrowser(DriverFactory.java:213)
	at com.kms.katalon.core.webui.driver.DriverFactory.openWebDriver(DriverFactory.java:188)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.doCall(OpenBrowserKeyword.groovy:74)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.call(OpenBrowserKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser.call(Unknown Source)
	at Script1557193179393.run(Script1557193179393.groovy:6)
	... 11 more

I checked the Project Setting > Execution and found the default driver was set “Web Service”

I know how to workaround the “Unable to open browser with url” message. Either of the following 2

  1. When I run the test case, I should be careful enough to explicity choose which browser to use (firefox, chorme , ie …).
  2. Change the Project Setting > Execution ? Default execution to some browser, rather than “Web Service”.

Disucssion

The message Unable to open browser with url and No dirver is set for execution does not tell users who are new to Katalon Studio what’s wrong; what they should do.

The message should be more informative.


Chromedriver problem
#2

Hi @kazurayam,

It’s because your project in a WebService project.
If you want to change your project type to default project. Please open .prj file and change the value of <type> section from WEBSERVICE to GENERIC or WEBUI.


Thanks.


#3

Can I change the type of a project already created through GUI?

Do I have to edit .prj file with editor?


#4

Just edit from an editor, we don’t support to convert project type.


#5

What do you mean by saying “It’s because …”?

I edited .prj file to be WEBSERVCE to GENERIC. and I restarted Katalon Studio, opened the project. ---- then there seems to be no change.

  • Project > Execution > Default still has the value of “Web Service”.
  • I still have to be careful enough to specify which browser to choose.

#6

What do you mean by saying “It’s because …”?

Please see my first image. When you create a project, there are radio buttons to help user specify their type of project.
If the project is a WebService project, the default execution should be WebService. UI and other features of Katalon Studio will support users to do their test API.
If the project is a Generic or WebUI project, the default execution should be Chrome.

I edited .prj file to be WEBSERVCE to GENERIC. and I restarted Katalon Studio, opened the project. ---- then there seems to be no change.

Please change to another browser. The WebService execution was saved then you need to change it.


#7

OK, I was not careful enough which type of project to choose when I newly create a project. That’s all.

To those who encountered Unable to open browser with url , No driver is set for execution message, check which type of project you chose. If you are doing WebUI testing, you should change Project > Execution > Default execution to Chrome or firefox, rather than Web Service.


#8

It’s maybe the reason why so many users report the same issue here. We will consider to bring Generic project as default and a function to convert their project type.

Thanks for your report @kazurayam


#9

Even in a “Web UI” type project, I can call WS.* keywords. This fact makes me think I do not have be mindful about the type of project (Web Service, Web UI, Mobile, Generic) at all.

I do not want a UI to change the type of Project. Rather, I want to forget about it. It’s OK that Katalon Studio have the project type and use it internally. Katalon could hide it behind the scene.

Going back to the initial post, all I want you to do is make the error message more informative so that user can realize that he should do either of

  1. When clicking the run button, he should explicitly specify the browser type, or
  2. change the Project > Exection > Default execution to be his favorite browser type.

I am saying this, because I expect many new Katalon users in my organization in future would be confused.


#10

@kazurayam
as far as i know (been a while since i played with katalon) the only benefit of choosing webservice template is that is changing the gui view (adding the quick controls for creating api request objects when using webservice) and changing the default execution for a new project.
for me that was fine, since my projects are mostly backend testing, so i dont have to remember to set the executor to ‘no browser’ when running them from CI (there is no point to use chrome, even headless, or any other driver, when doing just api/db testing)
for the rest, it doesnt matter what template you choose, you can use webUI keywords with webservice template and opposite, as you already find out.
is just a matter of what you will do most, UI or backend … i think this is the logic behind the templates behavior.


#11

I am trying to solve by applying the advice of this forum and it is impossible.

The error shown is:
Test Cases / Login Record Play FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed (WebUIKeywordMain.groovy: 64)

What can be done?

I have updated Chromdriver, the chrome version, updated katalon, starting katalon as administrator.
I don’t know what to do anymore. Solution?