1

enter image description here

Hi ,I'm doing automation test using katalon studio.while I was set value for the input text box, the system prompt error below in log properties:

Unable to set text '1' of object 'Object Repository/Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/Page_Welcome to KAPPS Factoring Sys (1)/input_model.buyerProgramStages_10' (Root cause: org.openqa.selenium.InvalidElementStateException: invalid element state: Element is not currently interactable and may not be manipulated
  (Session info: chrome=65.0.3325.181)
  (Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: 'SGA1014', ip: '172.27.35.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca..., userDataDir: C:\Users\lixinyu\AppData\Lo...}, cssSelectorsEnabled: true, databaseEnabled: false, 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: 65.0.3325.181, webStorageEnabled: true}
Session ID: 2e27edd7304a30bc2cc431c849c9e4b7)

So the status of my test case is failed,however, m able to set value into the textbox in the end.

Can someone tell me what happened?

My Script :

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser('')

WebUI.maximizeWindow()

WebUI.navigateToUrl('http://sgsgaapp80:18093/dash/landing.do')

WebUI.setText(findTestObject('Test BuyerProg/Page_Login to Kapps System/input_j_username'), 'lixin')

WebUI.setText(findTestObject('Test BuyerProg/Page_Login to Kapps System/input_j_password'), 'kpmg@123')

WebUI.click(findTestObject('Test BuyerProg/Page_Login to Kapps System/input_btnLogin'))

WebUI.click(findTestObject('Test BuyerProg/Page_KPMG System/div_India'))

WebUI.click(findTestObject('Test BuyerProg/Page_FactorPro - Welcome to KAPPS F/td_function changeRequestLocal'))

WebUI.click(findTestObject('Test BuyerProg/Page_FactorPro - Welcome to KAPPS F/a_SUPPLIER FINANCE'))

WebUI.click(findTestObject('Test BuyerProg/Page_FactorPro - Welcome to KAPPS F/a_Static Entry'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/div_hitarea expandable-hitarea'))

WebUI.click(findTestObject('Object Repository/Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/Page_Welcome to KAPPS Factoring Sys/li_Buyer Program Entry'))

// WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/a_Buyer Program Entry'))
WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_(ALL)    0AUTOBUY00 - 0'), 
    '0AUTOBUY00', true)

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_(ALL)    DB1 - DOM-Supp'), 
    'DB4', true)

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_form_2'))

WebUI.doubleClick(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.amo'))

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.amo'), 'Kevin Ng')

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerLimitID'), '9437523122C')

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.financeStage'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.financeStage_1'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.financeStage_2'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.financeStage_2'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/a_Indicators'))

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_Daily    Weekly    Mont'), 
    'W', true)

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.autoDebit'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.autoDebit_1'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_form_0'))

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_FIXED-TIER RATE'), 'M0', 
    true)

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages'), '5')

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_0 SBR (HKD)    1 USD LI'), 
    '9', true)

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_1'), '2')

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_2'), '30')

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_Document Date    Financ'), 
    'SFP001', true)

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_3'), '20')

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_4'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/a_Pre-acceptance'))

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_FIXED-TIER RATE_1'), 
    'M0', true)

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages'), '2')

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_5'), '2')

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_0 SBR (HKD)    1 USD LI_1'), 
    '9', true)

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_6'), '1')

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_7'), '35')

WebUI.selectOptionByValue(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/select_Document Date    Financ_1'), 
    'SFP002', true)

WebUI.setText(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_8'), '5')

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_model.buyerProgramStages_9'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_stage_0'))

WebUI.click(findTestObject('Test BuyerProg/Page_Welcome to KAPPS Factoring Sys/input_confirm_0'))

WebUI.waitForPageLoad(4)

String makerRef = new String()

makerRef = WebUI.getText(findTestObject('random/Page_Welcome to KAPPS Factoring Sys/span_Maker-Checker Ref  201712'))

println(('Required Maker Checker Reference should be as follows' + '\n') + makerRef)

String ref = makerRef.substring(20)

println(makerRef.substring(20))

WebUI.click(findTestObject('Test1_OR/Page_Welcome to KAPPS Factoring Sys/button_Logout'))

WebUI.closeBrowser(FailureHandling.CONTINUE_ON_FAILURE)

WebUI.callTestCase(findTestCase('SF 18093/checker-SF general'), [('makerReference') : ref], FailureHandling.STOP_ON_FAILURE)

My html for the stageform page:

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="k" uri="/extended-struts-tags"%>

<s:if test="%{model.csptProg!=null}">
    <s:url id="displayheader"
        action="/WEB-INF/pages/factorpro/_static/entry/buyerprogram/common/displayheader.jsp" />
    <s:include
        value="/WEB-INF/pages/factorpro/_static/entry/buyerprogram/common/displayheader.jsp" />
    <br />

    <div id="formDiv"><s:form action="stage" method="post"theme="kpmg_tabber">

        <s:url id="financestages"
            value="/WEB-INF/pages/factorpro/_static/entry/buyerprogram/common/form/financestages.jsp" />


        <s:url id="back" namespace="/createbuyerprogram" action="form" />


        <div class="tabber">
        <s:iterator value="model.buyerProgramStages" status="rowId">
            <div class="tabbertab">
            <h2><s:property value="stageName" /></h2>
            <s:include
                value="/WEB-INF/pages/factorpro/_static/entry/buyerprogram/common/form/financestages.jsp" />
            </div>
        </s:iterator>

        <%-- <div class="tabbertab">
        <h2><s:property value="%{getText('indicators')}" /></h2>
        <s:include
            value="/WEB-INF/pages/factorpro/_static/entry/buyerprogram/common/form/indicators.jsp" />
        </div> --%>

        </div>

        <s:if test="%{model.resubmitting}">
        <s:url id="owndashboard" namespace="%{dashboardnamespace}"
        action="%{dashboardaction}" />
        </s:if>

        <s:include value="/WEB-INF/pages/common/formparts/common.jsp" />
        <!-- For Maker checker Resubmit -->
        <s:include value="/WEB-INF/pages/common/workflow/resubmit-display-remarks.jsp" />
        <tr>
        <k:submit type="input" align="right" value="%{getText('submit')}"
            onclick="isCustomSubmit('stage','stage')" colspan="4" isfirst="true">
        </k:submit>
        <s:if test="%{model.resubmitting}">
            <k:submit type="input" align="right" value="%{getText('back')}"
                onclick="goto('%{owndashboard}');return false;"  islast="true" colspan="4">
            </k:submit>
        </s:if>
        <s:else>
            <k:submit value="%{getText('Previous Page')}" onclick="isBack('stage')" islast="true" colspan="4">
            </k:submit>
        </s:else>
        </tr>
    </s:form></div>
</s:if>
<s:else>
    <s:include value="/WEB-INF/pages/common/formparts/common.jsp" />
</s:else>
Lacie Yu
  • 49
  • 2
  • 8

2 Answers2

1

It tough to debug an exception/error without the relevant Code Trial and relevant HTML. However there seems to be an issue as follows :

The main issue here is the version compatibility between the binaries you are using as follows :

  • You are using chromedriver=2.35
  • Release Notes of chromedriver=2.35 clearly mentions the following :

Supports Chrome v62-64

  • You are using chrome=65.0
  • Release Notes of ChromeDriver v2.37 clearly mentions the following :

Supports Chrome v64-66

So there is a clear mismatch between ChromeDriver version (v2.35) and the Chrome Browser version (v65.0)

Solution

  • Upgrade ChromeDriver to current ChromeDriver v2.37 level.
  • Keep Chrome version at Chrome v65.x levels. (as per ChromeDriver v2.37 release notes)
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test.

How you escaped

Though you faced org.openqa.selenium.InvalidElementStateException and your test would have beenaborted KATALON STUDIO managed to keep the session alive and you were through.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Thanks for the help. I followed your advice but it still show version capability error in below: Unable to set text '1' of object ''(Root cause: org.openqa.selenium.InvalidElementStateException: invalid element state: Element is not currently interactable and may not be manipulated (Session info: chrome=65.0.3325.181)(Driver info: chromedriver=2.38.551601 – Lacie Yu Apr 20 '18 at 03:21
  • Are you facing this issue only with one particular field? Perhaps you need to upgrade to _Selenium v3.11.0_ – undetected Selenium Apr 20 '18 at 03:35
  • yes ,I only encountered for 1 particular filed.sorry I just use katalon may I know how to upgrade Selenium ,since I only use in-bound selenium packages in katalon studio. – Lacie Yu Apr 20 '18 at 06:18
  • I am afraid, I diagnosed your issue through your error stack trace. Perhaps some of our stackoverflow volunteer from `katalon-studio` tag may be able to help you out. – undetected Selenium Apr 20 '18 at 06:21
  • @Lacie YU please try use "WebUI.waitForPageLoad(5)" method and try – Vel Guru Apr 21 '18 at 06:01
  • @LacieYu For _ElementNotInteractableException_ see this discussion [How to resolve ElementNotInteractableException in Selenium webdriver?](https://stackoverflow.com/questions/43868009/how-to-resolve-elementnotinteractableexception-in-selenium-webdriver/46601444#46601444) – undetected Selenium Apr 30 '18 at 05:05
0

Add the following line to the script, just before the element that shows the error.

WebUI.delay(3)

It worked for me.

Meloman
  • 3,558
  • 3
  • 41
  • 51
Kolapo
  • 29
  • 2