Issues when executing headless tests

I’m using version 5.10.1.

This is code where it works on another field:

WebUI.clearText(findTestObject(‘Page_Create Motor Risk Item EpicAS/sum_insured_fld’))
WebUI.delay(1)
WebUI.executeJavaScript(‘document.getElementById('ri_sum_insured').value = 3000000’, null)

This is the field that it doesn’t work on:

WebUI.clearText(findTestObject(‘Page_Gavin Bannister EpicASSURE/input_Amt. Received_receipt_it’), FailureHandling.STOP_ON_FAILURE)
WebUI.delay(5)
WebUI.executeJavaScript(“document.querySelector(‘#receipt_item_amount_received_0’).value=50000”, null)

The error in the console doesn’t appear on the Javascript execution, it occurs when I do an assertion on an element that should have the contents of what I had set in the field. it doesn’t find the contents because it wasn’t set

Below is the bit of HTML for the field:

I have tried using the Send Keys to fix it, using what I found in this post: http://forum.katalon.com/t/element-not-interactable-in-chrome-headless/19718

For the getURL issue, see code and errors from console below:

WebUI.click(findTestObject(‘Claims/print_notif_slip’))
WebUI.delay(15)
WebUI.switchToWindowIndex(1)
newUrl = WebUI.getUrl()
CustomKeywords.‘tools.readPDF.ReadPDF’(newUrl, “SLIP”)

Console:

com.kms.katalon.core.exception.StepFailedException: Unable to get the url of the current window (Root cause: org.openqa.selenium.TimeoutException: timeoute[0;39m
e[31m (Session info: headless chrome=72.0.3626.121)e[0;39m
e[31m (Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)e[0;39m
e[31mCommand duration or timeout: 0 millisecondse[0;39m
e[31mBuild info: version: ‘3.7.1’, revision: ‘8a0099a’, time: '2017-11-06T21:07:36.161Z’e[0;39m
e[31mDriver info: com.kms.katalon.selenium.driver.CChromeDrivere[0;39m
e[31mCapabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.43.600210 (68dcf5eebde371…, userDataDir: …}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:50096}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 72.0.3626.121, webStorageEnabled: true}e[0;39m
e[31mSession ID: 577529aaf1182aa663271e6fe1f64c38)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.GetUrlKeyword.getUrl(GetUrlKeyword.groovy:71)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.GetUrlKeyword.execute(GetUrlKeyword.groovy:66)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.getUrl(WebUiBuiltInKeywords.groovy:233)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$getUrl$9.call(Unknown Source)e[0;39m
e[31m at 01 - Create Claim.run(01 - Create Claim:62)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.main.TestCaseMain.runTestCase(TestCaseMain.java:97)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)e[0;39m
e[31m at TempTestCase1552844547878.run(TempTestCase1552844547878.groovy:22)e[0;39m