I want to check a text area is disabled or enabled, I use “verifyElementClickable” but not successful, and get below error :
Test Cases/TCC_hoantra FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to verify object ‘Object Repository/Page_TI CHNH CNG/textarea_Ni dung_ct_noidung’ to be clickable (Root cause: Object ‘Object Repository/Page_TI CHNH CNG/textarea_Ni dung_ct_noidung’ is NOT clickable)
You should inspect the object attributes. I’m sure there’s a property there that indicates whether the object is enabled or disabled. Or, maybe the main locator is changing like the ID or name.
If that happens use the WebUI.verifyElementAttributeValue.
You should inspect the object attributes. I’m sure there’s a property there that indicates whether the object is enabled or disabled. Or, maybe the main locator is changing like the ID or name.
If that happens use the WebUI.verifyElementAttributeValue.
Hope that helps…
I can not find that property. Please see my attached file
@7314-Arnel: Hi Arnel, I can verify now but it stopped immediately after this command, how I continue after that
Unable to verify if object ‘Object Repository/Page_TI CHNH CNG/textarea_Ni dung_ct_noidung’ has attribute ‘disabled’ with value ‘false’ (Root cause: Object ‘Object Repository/Page_TI CHNH CNG/textarea_Ni dung_ct_noidung’ has attribute ‘disabled’ with actual value ‘true’ instead of expected value ‘false’)
This is my command:
if (WebUI.verifyElementAttributeValue(findTestObject(‘Page_TI CHNH CNG/textarea_Ni dung_ct_noidung’), ‘disabled’, ‘false’, 20))
if (!(results.toString().startsWith('Da Tao chuyen tra cho lien ngan'))
&& ! results.toString().startsWith('Tạo chuyển trả thành công')) {
KeywordUtil.markFailed('Message does not contain expected text.')
}
}
else
{
println(content.toString())
}
And this is the exception message
Test Cases/TCC_hoantra FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Object ‘Object Repository/Page_TI CHNH CNG/button_Lu’ is clickable
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:32)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotClickableKeyword$_verifyElementNotClickable_closure1.doCall(VerifyElementNotClickableKeyword.groovy:80)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotClickableKeyword$_verifyElementNotClickable_closure1.call(VerifyElementNotClickableKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:21)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotClickableKeyword.verifyElementNotClickable(VerifyElementNotClickableKeyword.groovy:96)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotClickableKeyword.execute(VerifyElementNotClickableKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementNotClickable(WebUiBuiltInKeywords.groovy:577)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementNotClickable$9.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at Script1541382521574.run(Script1541382521574.groovy:64)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149)
at TempTestCase1541574831291.run(TempTestCase1541574831291.groovy:22)
at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
at groovy.lang.GroovyShell.run(GroovyShell.java:518)
at groovy.lang.GroovyShell.run(GroovyShell.java:507)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
at groovy.ui.GroovyMain.run(GroovyMain.java:384)
at groovy.ui.GroovyMain.process(GroovyMain.java:370)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
at groovy.ui.GroovyMain.main(GroovyMain.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
)