A brick wall, right out of the gate

I’m trying to evaluate Katalon Studio to see whether it will meet my meager needs, and unfortunately I didn’t make it to first base before I crashed and burned.

My goal is to build a .NET console application that manipulates the admin pages provided by my home network gateway device’s internal web server to disable & enable Wi-Fi on a predetermined schedule.

To this end, I wish to:

  1. Begin recording
  2. Navigate to the URL https://192.168.0.254/2.0/gui/#/wifi/5GHz/priv/basic (a private, internal IP address)
  3. Wait for page redirection to the login form
  4. Enter my credentials
  5. Wait for redirection back to the original URL (step #2 above)
  6. Click the button to turn off Wi-Fi
  7. Click the button to save the new configuration
  8. Export the saved steps to C#
  9. Integrate the code with my console application
  10. Schedule and run the app

It seems a pretty simple process, I would imagine. But I got this (below) when I tried to load the URL in Katalon Studio’s introductory walk-through.

What should I do to get this working?

— Error Log -----------------------------------------------

=============== ROOT CAUSE =====================

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

11-02-2024 05:44:40 PM Test Cases/New Test Case

Elapsed time: 0.949s

Test Cases/New Test Case 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:117)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:43)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:82)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:68)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:62)
	at New Test Case.run(New Test Case:20)
	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:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:124)
	at TempTestCase1730598277869.run(TempTestCase1730598277869.groovy:25)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created
from unknown error: cannot find Chrome binary 
Host info: host: 'C52893-F', ip: '192.168.0.175'
Build info: version: '4.22.0', revision: 'c5f3146703'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}, unhandledPromptBehavior: ignore, webSocketUrl: true}]}]
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:232)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:161)
	at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:114)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:88)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:83)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:72)
	at com.kms.katalon.selenium.driver.CChromeDriver.<init>(CChromeDriver.java:13)
	at com.kms.katalon.core.webui.driver.chrome.ChromeDriverBuilder.createDriver(ChromeDriverBuilder.java:41)
	at com.kms.katalon.core.webui.driver.AbstractDriverBuilder.build(AbstractDriverBuilder.java:39)
	at com.kms.katalon.core.webui.driver.DriverFactory.startNewBrowser(DriverFactory.java:251)
	at com.kms.katalon.core.webui.driver.DriverFactory.openWebDriver(DriverFactory.java:161)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.doCall(OpenBrowserKeyword.groovy:75)
	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:35)
	... 18 more

This error message is significant.

Your test script tried to launch a Chrome browser and failed because it could not find the binary executable of Chrome on your machine. That is what the message told you.

Do you have Chrome browser installed on your machine?


Or, do you really want your code to launch a browser?

I do not understand what you wrote here. It seems to me that you are trying to do something that Katalon Studio would not help. Are you sure your approach is right?

I figured it out, thank you.

The introductory walk-through at product installation fails to provide the step of selecting the desired browser. You’re correct—I don’t have Chrome installed. I’m using Edge.

Once I got that set, I was able to record.

  1. My gateway device has a built-in web server
  2. It serves up pages for administering the device (DCHP, DMZ, Wi-Fi, Port Forwarding, etc.)
  3. I wish to automate the steps of turning Wi-Fi on or off
  4. There’s a decision tree involved, and I need custom logging, so I’ve elected to enclose the automation in a .NET Console app
  5. Therefore, I need to export the recording to C# (VB.NET, actually, but I can do that conversion later)

Ah. On the contrary, Katalon Studio is exactly appropriate for this requirement :slightly_smiling_face: It records the steps and generates the C# code, and then I integrate that code into my application.

No, Katalon Studio can not generete C# code

Katalon Recorder is capable of exporting scripts into C#.

Katalon Studio and Katalon Recorder — these are two different products, not one.

Hi there, and thanks for posting in the Katalon community! :hugs:

To help you faster, please review our guide on Katalon Recorder here: Katalon Recorder overview | Katalon Docs. Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,
Albert Le

2 Likes

@jeff.bowman

Just for your information. There is a post about Katalon Recorder.

Google announced that they have a plan to disable those Chrome extensions that do not confirm to the Manifest V3. It is a risk for KR users.

@jeff.bowman

Do you want a browser automation tool on .NET? Then you would prefer a solution supported by Microsoft. How about this?

Installation:

Code generation:

Oh, my. Well then, I guess Studio is not exactly appropriate for this requirement! It seems I was expecting that it would provide the feature before I actually verified. Thanks for the clarification.

Got it. I’ve installed it and recorded and exported my first script.

This is what I need, thank you.

Thank you for the reference, that helps.

I believe I’ve got it covered now, thanks again.

1 Like

Very good, thank you.

That looks pretty good, thanks!

FYI I just finished my app that enables/disables WiFi in my gateway device. It works great!

1 Like

Did you use Katalon Recorder?

which one did you use KR or playwright recorder?

I did, yes. It was pleasantly easy to use.

1 Like

KR. But I really like what I’m seeing with that Playwright.

1 Like