Can't Run Test Suite Error Failed connecting to tab web socket.

Hi. I wonder what’s wrong with this. So I’m gonna run a test suite containing test case of login as 1st test case, search customer as 2nd tst case and input customer as 3rd test case. Both 2nd and 3rd test case are continuously process of 1st test case which is login.
But when I run the test suite, the 2nd test case is skipped and error Failed connecting to tab web socket. appeared. Can somebody help me with this? I can’t found the solution. Thank you

Hi,

I only found this reference: Katalon Help Center. Try this out and let me know if it does not work.

I’m seeing a similar issue. It looks like there has been some breaking changes to the CDT Protocols and the CDTUtils plugin may need an update. Here is another post for a different library that is seeing the same problem that I have (Cookies Node – Execute failed: Failed connecting to tab web socket - #5 by qqilihq - Palladian & Selenium - KNIME Community Forum).

Is there any way to contact the creator of CDPUtils to get an update @Elly_Tran?

Hi,

After asking my team, I know that Katalon has not supported Web socket officially. Most users use custom script of plugin in Katalon Store written by other people to run their cases. I might be able to suggest this plugin WebSocketConnect but not sure this can help. Thank you!

Hi, @Elly_Tran .

I’m having the same issue while trying to run Test Suites locally on Windows and Mac.There is no problem while running single tests.

Adding the --no-sandbox into the Project → Settings → Desired Capabilities → WebUI → Chrome (as per Katalon Help Center) didn’t help.

Aye, the reply from Katalon above doesn’t make any sense, why would a script work perfectly when executed outside of a test suite then all of a sudden start getting errors only when running inside a test suite?

EDIT: I think this may be a Katalon bug - if I run from the test suite with all parameters set to “default” everything works fine, if I run using test data it fails due to the socket error every time, but the steps it’s failing on are the WebUI action immediately after the section that uses the variable-bound data and have nothing to do with the variable data section. The WebUI activities involving the variable data work perfectly with no issues

Edit 2 - Ran a few different experiments with the following results (all variable values are the same in each of these scenarios)

  • Variable Binding in Test Suite set to “Default” - no script error
  • Variable Binding set to “Script Variable” for all fields and “Value” field manually populated - no script error
  • Variable Binding mapped to an internal data table - script error
  • Variable Binding mapped to an Excel Data field - script error

Edit 3 - If I use a “driver script” + Data table combination (i.e. have a column in the Excel sheet giving the path of the script to be executed and the only referenced “driver” script is a simplistic test case using WebUI.callTestCase) then I get no web socket error either. Seems to be related to having a data variable bound directly to an executing script, as the intermediary has no issues

1 Like

Hi,

Thank you for sharing your ideas. I will inform my internal team to investigate on it more and back to you guys soon if it is a bug.

Playing around with this a bit more this morning, my findings:

  • This only occurs for me when returning from a called sub-function/keyword that leverages the data in the Test Data spreadsheet

  • Refreshing the page doesn’t help, it only works after making the first call to a page object, that call fails, then all other page objects work just fine afterwards. This occurs regardless of page attempted, and the page script runs just fine outside of this sequence of events so I know the object call is correct.

  • Appears to mainly be occurring for the first WebUI.verifyElementPresent function call encountered, and unfortunately gives a failed message regardless of the Failure Handling setting of the WebUI.verifyElementPresent option, presumably because the failure is at the Katalon level and not the script object level.

Full socket error message:


Reason:
groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, java.lang.String, com.kms.katalon.core.model.FailureHandling) values: [TestObject - 'Object Repository/Common Portal Elements/header_PerfDetailsByPage', ...]
Possible solutions: verifyElementPresent(com.kms.katalon.core.testobject.TestObject, int, com.kms.katalon.core.model.FailureHandling), verifyElementPresent(com.kms.katalon.core.testobject.TestObject, int), verifyElementNotPresent(com.kms.katalon.core.testobject.TestObject, int, com.kms.katalon.core.model.FailureHandling), verifyElementNotPresent(com.kms.katalon.core.testobject.TestObject, int), verifyElementText(com.kms.katalon.core.testobject.TestObject, java.lang.String, com.kms.katalon.core.model.FailureHandling)
	at 02-SmkTst-WebBrsrPerfDtl-Elmnts.run(02-SmkTst-WebBrsrPerfDtl-Elmnts:118)
	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.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:148)
	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:187)
	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
	at TempTestSuite1689597869561.run(TempTestSuite1689597869561.groovy:36)

This message is saying that your code is written just wrongly.

verifyElementPresent(com.kms.katalon.core.testobject.TestObject, java.lang.String, com.kms.katalon.core.model.FailureHandling)

Your code called verifyElementPresent with 2nd argument of type String, which is not valid against the defined method signature.

You need to fix your coding mistake.