Switch to Headless Chrome

Hello,
My customer wishes to run the tests I’m writing on a server, in headless mode, on Chrome.
My tests run smoothly in regular mode on Chrome but they won’t go to the second step in headless Chrome.
I tried setting the window size in the Projet settings :

The login page is extremely simple : loginTitle

No such luck :

=============== ROOT CAUSE =====================
Caused by: >com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web >element with id: ‘Object Repository/Page_loginTitle/input_Email_input-username’ >located by ‘//*[@id=“login-username”]/fieldset/input’ not found

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

10-12-2021 02:17:32 PM Test Cases/TC01_Log-in_to_DI/Distributor/Desktop 1 se >sv

Elapsed time: 38,858s

Test Cases/TC01_Log-in_to_DI/Distributor/Desktop 1 se sv FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘ec-seaa->pprd-0000122610@mailinator.com’ of object ‘Object >Repository/Page_loginTitle/input_Email_input-username’
at >com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(Web>>UIKeywordMain.groovy:64)
at >com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(We>bUIKeywordMain.groovy:26)
at >com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeywor>d.groovy:66)
at >com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeywo>rd.groovy:37)
at >com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatfor>m(KeywordExecutor.groovy:74)
at >com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInK>eywords.groovy:980)
at >com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$1.call(Unkno>>wn Source)
at Desktop 1 se sv.run(Desktop 1 se sv:24)
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:430>)
at >com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:42>1)
at >com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseEx>ecutor.java:400)
at >com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor>.java:392)
at >com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:273)
at >com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)>
at >com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown >Source)
at TempTestCase1634041047293.run(TempTestCase1634041047293.groovy:25)
Caused by: >com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web >element with id: ‘Object Repository/Page_loginTitle/input_Email_input-username’ >located by ‘//*[@id=“login-username”]/fieldset/input’ not found
at >com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(Web>UiCommonHelper.java:1368)
at >com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElem>ent(WebUIAbstractKeyword.groovy:27)
at >com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElem>ent(WebUIAbstractKeyword.groovy:26)
at >com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword$_setText_closure1.do>Call(SetTextKeyword.groovy:51)
at >com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword$_setText_closure1.call>(SetTextKeyword.groovy)
at >com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(We>bUIKeywordMain.groovy:20)
… 17 more

Any help will be greatly appreciated.

Thanks in advance

Hi @marie.piolot,

Could you please check the login page?
Currently, we receive “This site can’t be reached” every time we try to access it.

Regards,
Nam Nguyen.

Hello,
I don’t know why you can’t reach it. My colleague and I can. Maybe the owner uses a firewall or a VPN ?
Marie Piolot

Hi @marie.piolot,

I’m really for the late response,
The site works fine now, and it seems like its source was changed, right?
Is the problem still there?
If yes, could you provide information about these below items?

  • Your OS
  • Your KS version
  • The script for the first 2 steps

Regards,
Nam Nguyen.