Org.openqa.selenium. Element Not Interactable Exception

KATALON-STUDIO

I’m getting this error when trying to set text on the object. Would you please help me on this?
=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
At object: ‘Object Repository/SecurityAccessGroup/Page_Quotes/input_Owner’

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

04-28-2023 10:59:14 AM User updates NextGen quote owner

Elapsed time: 40.167s

User updates NextGen quote owner FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘Test.user2@test.com’ of object ‘Object Repository/SecurityAccessGroup/Page_Quotes/input_Owner’
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.SetTextKeyword.setText(SetTextKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:980)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$2.call(Unknown Source)
at securityAcessGroupScripts.UserQuoteUpdate.user_updates_nextgen_quote_owner(UserQuoteUpdate.groovy:131)
at ✽.User updates NextGen quote owner(C:/Users/Danica.Aquino2/Desktop/Katalon Automation/Katalon%20project%20ffix/Include/features/Security Access Group/UserUpdateQuote.feature:29)
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: chrome=112.0.5615.138)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘PHCORPL8KBT9G3’, ip: ‘10.169.13.26’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_282’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 112.0.5615.138, chrome: {chromedriverVersion: 112.0.5615.49 (bd2a7bcb881c…, userDataDir: C:\Users\DANICA~1.AQU\AppDa…}, goog:chromeOptions: {debuggerAddress: localhost:51628}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 54ba23eca6b2a0f4bcabc1470289971b
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.clear(RemoteWebElement.java:124)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
at com.sun.proxy.$Proxy22.clear(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.clear(EventFiringWebDriver.java:436)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword$_setText_closure1.doCall(SetTextKeyword.groovy:53)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword$_setText_closure1.call(SetTextKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:980)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$2.call(Unknown Source)
at securityAcessGroupScripts.UserQuoteUpdate.user_updates_nextgen_quote_owner(UserQuoteUpdate.groovy:131)
at cucumber.runtime.Utils$1.call(Utils.java:26)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:20)
at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:48)
at cucumber.runtime.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:50)
at cucumber.runner.TestStep.executeStep(TestStep.java:68)
at cucumber.runner.TestStep.run(TestStep.java:50)
at cucumber.runner.PickleStepTestStep.run(PickleStepTestStep.java:53)
at cucumber.runner.TestCase.run(TestCase.java:47)
at cucumber.runner.Runner.runPickle(Runner.java:44)
at cucumber.runtime.Runtime.runFeature(Runtime.java:120)
at cucumber.runtime.Runtime.run(Runtime.java:106)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main$run.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:108)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:74)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:75)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:248)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)
at userUpdateQuote.run(userUpdateQuote:21)
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:151)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:185)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1682650637497.run(TempTestSuite1682650637497.groovy:36)

The above is the reason for the error. To “fix” this, you have to ensure your textbox is ready to take your information. So,

  1. did you give enough time for the page to form, maybe use WebUI.waitForPageLoad(10) beforehand.
  2. do you have some other element overlapping the textbox just before your setText statement, such as a Calendar GUI. For this, you may have to click elsewhere to have the GUI disappear beforehand. (Note: I don’t see a statement that another element would get the focus, so this is not likely in this case.)
  3. do you have to select some other element before the textbox is active. For this, you may have to click on the other element to set up the textbox beforehand.

Start with those and if none work for you, then we need more information such as the HTML.

Edit: You are not using the same application as the one in the link, however, I was thinking you may have the same issue as per my #1 issue above.

Edit2: So I went to a NextGen HC login site and tried to login with your setText adding my suggestion to add WebUI.waitForPageLoad(10) and it wasn’t enough time to get the login panel to form. I also had to add a WebUI.delay(2). This was enough to get the setText for the username to work correctly and I had no issue with the password as the panel was now formed.

Edit3: Instead of WebUI.delay(2), you can try:

WebUI.waitForElementVisible(findTestObject('Object Repository/SecurityAccessGroup/Page_Quotes/input_Owner'), 10)
1 Like

Hi @grylion54, I really appreciate your help on this. however, whatever I try, I encounter the same issue all over again. I do encounter the error when at WebUI.setText

here’s my code.

@When("User updates Opportunity owner")
public void user_updates_Opportunity_owner() {

	WebUI.delay(15)

	WebUI.click(findTestObject('Object Repository/SecurityAccessGroup/Page_Opportunities/div_EditOpportunityDetails'))
	WebUI.waitForPageLoad(10)
	WebUI.waitForElementVisible(findTestObject('Object Repository/SecurityAccessGroup/Page_Quotes/input_Owner'), 10)
	WebUI.waitForElementClickable(findTestObject('Object Repository/SecurityAccessGroup/Page_Opportunities/OppOwner'), 30)
	WebUI.click(findTestObject('Object Repository/SecurityAccessGroup/Page_Opportunities/OppOwner'))

	if (GlobalVariable.ACTuser1 == 'actuationtech.user1@emerson.com') {
		
		WebUI.delay(2)
		WebUI.setText(findTestObject('Object Repository/SecurityAccessGroup/Page_Opportunities/OppOwner'), 'Test.user1@test.com') 
		
		}

Can you right click on the element, OppOwner, and select “Inspect” from the pop-up? Do this twice to get the HTML to display for the exact location of the element. If you can post the HTML here we may be able to assist you further. Sorry, but my assumption right now is that you have the wrong pathway to the OppOwner textbox.

Edit: Do you have an <iframe> in your pathway to the OppOwner textbox? If you do, then you have to “move” to it first (WebUI.switchToFrame(to, 10)) before you can “move” (click/setText/anything) to the OppOwner textbox.