Automation problem

Hello everyone,

I have a problem with Katalon Studio.The problem is that the system can’t recognize the Menu object, I am one of the new users in Katalon Studio, I tried to copy the Xpath using the chroPath and paste it into my script but unfortunately I always get an error message. Could someone help me and tell me where the problem is and what I am missing?2021-05-21T00:00:00Z

The most interesting line in any error report is the one beginning “Caused by” - unfortunately, your screenshot has cropped it off.

Please post the entire error text below.

You entered a login name, a password and then click on a login button. Then you click on the span element. Is the span element on the same web page as the login button? I think you need a wait statement between the click on login button and the click on the menu span, such as:

WebUI.navigateToUrl()
WebUI.setText()
WebUI.setEncrytedText()
WebUI.click()

WebUI.waitForPageLoad(10)

WebUI.click()
WebUI.closeBrowser()

I think this time it’s the right one

hello,
are there any i-frames?
for the future, can you please copy&paste text of exception instead of screenshot…

@Andrej_Podhajsky

I didn’t quite understand your request

We can’t see the entire error message because it is being cut off.

Andrej is asking you to copy and paste the error instead of taking a screenshot.

1 Like

Hello
Here, you will see the error message that the system displays
message error:
caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’ located by ‘//[@id=“CI_MAINMENU_topMenuItem0x4”]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1368)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.doCall(MouseOverKeyword.groovy:54)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.call(MouseOverKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:805)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$5.call(Unknown Source)
at Script1621723528757.run(Script1621723528757.groovy:76)
… 11 more
)
2021-05-23 15:46:03.611 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/New Test Case FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to move mouse over object ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’
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.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:805)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$5.call(Unknown Source)
at New Test Case.run(New Test Case:76)
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:398)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:389)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:368)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:360)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:255)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1621784623420.run(TempTestCase1621784623420.groovy:25)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’ located by '//
[@id=“CI_MAINMENU_topMenuItem0x4”]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1368)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.doCall(MouseOverKeyword.groovy:54)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.call(MouseOverKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 17 more

2021-05-23 15:46:03.623 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/New Test Case

Unable to move mouse over object ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to move mouse over object ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’
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.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:805)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$5.call(Unknown Source)
at New Test Case.run(New Test Case:76)
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:398)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:389)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:368)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:360)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:255)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1621784623420.run(TempTestCase1621784623420.groovy:25)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’ located by ‘//*[@id=“CI_MAINMENU_topMenuItem0x4”]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1368)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.doCall(MouseOverKeyword.groovy:54)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.call(MouseOverKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:805)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$5.call(Unknown Source)
at Script1621723528757.run(Script1621723528757.groovy:76)
… 11 more

@fallbamba83

Currently you have:

...
WebUI.click(findTestObject('Object Repostiory/Page_Login/input_Password_loginButton'))

WebUI.click(findTestObject('Object Repostiory/Page_Rcapitulatif de vos tches/span_Menu'))
...

Try changing it to:

WebUI.click(findTestObject('Object Repostiory/Page_Login/input_Password_loginButton'))

WebUI.waitForElementVisible(findTestObject('Object Repostiory/Page_Rcapitulatif de vos tches/span_Menu'), 5)

WebUI.click(findTestObject('Object Repostiory/Page_Rcapitulatif de vos tches/span_Menu'))

Or,

WebUI.click(findTestObject('Object Repostiory/Page_Login/input_Password_loginButton'))

WebUI.enhancedClick(findTestObject('Object Repostiory/Page_Rcapitulatif de vos tches/span_Menu'))

@kazurayam
My problem is more related to the fact that I can’t scroll on the “Work management” object
Look at the error message it shows me
Error Message :
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’ located by ‘//span[contains(text(),‘Gestion du travail’)]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1368)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword$_scrollToElement_closure1.doCall(ScrollToElementKeyword.groovy:79)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword$_scrollToElement_closure1.call(ScrollToElementKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.scrollToElement(ScrollToElementKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.execute(ScrollToElementKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.scrollToElement(WebUiBuiltInKeywords.groovy:4002)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$scrollToElement$6.call(Unknown Source)
at Script1621723528757.run(Script1621723528757.groovy:78)
… 11 more
)
2021-05-24 01:47:45.283 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/New Test Case FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to scroll to object ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’
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.ScrollToElementKeyword.scrollToElement(ScrollToElementKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.execute(ScrollToElementKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.scrollToElement(WebUiBuiltInKeywords.groovy:4002)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$scrollToElement$6.call(Unknown Source)
at New Test Case.run(New Test Case:78)
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:398)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:389)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:368)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:360)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:255)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1621820788086.run(TempTestCase1621820788086.groovy:25)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’ located by ‘//span[contains(text(),‘Gestion du travail’)]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1368)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword$_scrollToElement_closure1.doCall(ScrollToElementKeyword.groovy:79)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword$_scrollToElement_closure1.call(ScrollToElementKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 17 more

2021-05-24 01:47:45.287 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/New Test Case

@fallbamba83

Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to scroll to object ‘Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail’

I can not find a line of

WebUI.scrollToElement(findTestObject('Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail'), x)

in the source code you previously showed to us:

Did you change your code ?

Unless you share your “current code” together with the error logs, it is difficult for others to help you.

I suppose, the locator of the TestObject "Object Repository/Page_Rcapitulatif de vos tches/span_Gestion du travail" is not pointing to the HTML element of your interest.

Please check the locator (XPath or CSS Selector) against the HTML source of your web page.

I guess, you created this TestObject using the Record Web Utility built in Katalon Studio. Yes, the tool does help you, but please be advised that the tools does not always generate 100% correct codes. You should not trust the tools too much. You are supposed to examine the generated materials and correct them as appropriate.

In order to inspect web pages, you may want to use DevTools of Browsers

If you want to study the XPath technology from the bottom up, please read this: