FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to set

here’s the full error:

FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to set text (Root cause: java.lang.IllegalArgumentException: Object is null)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)

at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)

at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:65)

at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)

at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)

at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$4.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 Script1537458625563.run(Script1537458625563.groovy:33)

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 TempTestCase1537463097847.run(TempTestCase1537463097847.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)

)

I have two input fields one after another. I have selected the same attributes to find these objects, but for some reason only the second one sets text (it fails on the first one). The error says the object is null, but the object is defined in the test case as the text input field (very similar to the second line just named differently).
Am I missing something else? Everything looks identical to me when comparing the two objects.
The script is very simple:
Go to product page
enter text on two lines
select other variables
add to cart

any help is appreciated. Thanks!

Hi Christina

I think we’ll need a bit more information than just the error message (follow the advice I gave here http://forum.katalon.com/discussion/9337/tip-my-test-is-broken-nothing-works-please-help-me )

My guess is there is something amiss with the Test Object definition.

Hello Thomas,

I also got the same error.
Below I share a screenshot.
Could you please help me out!

Error :Test Cases/New Test Case (2) FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/Page_CURA Healthcare Service/td_27’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_CURA Healthcare Service/td_27’ located by ‘By.xpath: //td[(text() = ‘27’ or . = ‘27’)]’ not found)

I m waiting for your reply.

Thanks.

12.png

Any update to this thread?

Is anyone solved this? @7758-Manish @Christina Tedesco @Russ Thomas

Manish,

I believe you tried one of the Katalon Studio tutorial

At Step10, you worked on a date-chooser like pop-up.

Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_CURA Healthcare Service/td_27’ located by ‘By.xpath: //td[(text() = ‘27’ or . = ‘27’)]’ not found)

You have a Test Object with xpath //td[(text() = ‘27’ or . = ‘27’, and the Test Object caused a failure.
You created this Test Object using Web Spy as the tutorial document guided you.
The Test Object pointed to the 27/Oct 2018 Satuaday in the date-chooser dialong.

The date-choose dialog is opened ONLY WHEN you (or your test case) clicks the “date-chooser-starter” button

I presume your test case is not clicking the button, therefore the date chooser dialog is NOT opened, therefore the Test Object with xpath //td[(text() = ‘27’ or . = ‘27’ fails to find corresponding HTML node. This is the reason why WebElementNotFoundException.

I have ever seen this exact case, so I am pretty sure.

**
Solution:**

Do not be bothered with the date-chooser dialog. You do not need it. Just delete the TestObject in question.

Instead, you can type a date string in “dd/mm/yyyy” format into the “Visit Date” field.

Calendar-e1513067438109.png

datechooserbutton.PNG

@kazurayam
If the modified TestObject Property is not found then the exception is thrown as stated above

The test object is trying to check the property exists or not and at that instance StepFailedException thrown from the keyword.
But the Test Object is required in multiple data case then how to handle that without throwing such an exception???

I need more readable information. The screenshot is not enough.

hi ,

i am getting the below error when i try to debug .
Thread [main] (Suspended (exception FileNotFoundException))
can you please help me to solve this issue .