Unable to find the element located by

Hello.

I have a pipeline release in Azure DevOps for automate some tests. I have Katalon 6.3.3 and I run the test in console mode in the server and this is successful.

<record>
  <date>2020-01-09T11:08:27</date>
  <millis>1578586107501</millis>
  <sequence>25</sequence>
  <level>START</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>startKeyword</method>
  <thread>1</thread>
  <message>Start action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
  <nestedLevel>1</nestedLevel>
  <property name="startLine">27</property>
  <property name="stepIndex">3</property>
</record>
<record>
  <date>2020-01-09T11:08:28</date>
  <millis>1578586108729</millis>
  <sequence>32</sequence>
  <level>PASSED</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>logMessage</method>
  <thread>1</thread>
  <message>Object: &amp;apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&amp;apos; is clicked on</message>
  <nestedLevel>1</nestedLevel>
</record>
<record>
  <date>2020-01-09T11:08:28</date>
  <millis>1578586108734</millis>
  <sequence>33</sequence>
  <level>END</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>endKeyword</method>
  <thread>1</thread>
  <message>End action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
  <nestedLevel>1</nestedLevel>
</record>> <record>
>   <date>2020-01-09T11:08:27</date>
>   <millis>1578586107501</millis>
>   <sequence>25</sequence>
>   <level>START</level>
>   <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
>   <method>startKeyword</method>
>   <thread>1</thread>
>   <message>Start action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
>   <nestedLevel>1</nestedLevel>
>   <property name="startLine">27</property>
>   <property name="stepIndex">3</property>
> </record>
> <record>
>   <date>2020-01-09T11:08:28</date>
>   <millis>1578586108729</millis>
>   <sequence>32</sequence>
>   <level>PASSED</level>
>   <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
>   <method>logMessage</method>
>   <thread>1</thread>
>   <message>Object: &amp;apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&amp;apos; is clicked on</message>
>   <nestedLevel>1</nestedLevel>
> </record>
> <record>
>   <date>2020-01-09T11:08:28</date>
>   <millis>1578586108734</millis>
>   <sequence>33</sequence>
>   <level>END</level>
>   <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
>   <method>endKeyword</method>
>   <thread>1</thread>
>   <message>End action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
>   <nestedLevel>1</nestedLevel>
> </record><record>
  <date>2020-01-09T11:08:27</date>
  <millis>1578586107501</millis>
  <sequence>25</sequence>
  <level>START</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>startKeyword</method>
  <thread>1</thread>
  <message>Start action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
  <nestedLevel>1</nestedLevel>
  <property name="startLine">27</property>
  <property name="stepIndex">3</property>
</record>
<record>
  <date>2020-01-09T11:08:28</date>
  <millis>1578586108729</millis>
  <sequence>32</sequence>
  <level>PASSED</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>logMessage</method>
  <thread>1</thread>
  <message>Object: &amp;apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&amp;apos; is clicked on</message>
  <nestedLevel>1</nestedLevel>
</record>
<record>
  <date>2020-01-09T11:08:28</date>
  <millis>1578586108734</millis>
  <sequence>33</sequence>
  <level>END</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>endKeyword</method>
  <thread>1</thread>
  <message>End action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
  <nestedLevel>1</nestedLevel>
</record>

The server is configured like a agent for DevOps and when the pipeline run de test with the katalon plugin for Azure DevOps, I get this error:

<record>
  <date>2020-01-09T10:45:22</date>
  <millis>1578584722960</millis>
  <sequence>25</sequence>
  <level>START</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>startKeyword</method>
  <thread>1</thread>
  <message>Start action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
  <nestedLevel>1</nestedLevel>
  <property name="startLine">27</property>
  <property name="stepIndex">3</property>
</record>
<record>
  <date>2020-01-09T10:45:54</date>
  <millis>1578584754694</millis>
  <sequence>30</sequence>
  <level>INFO</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>logMessage</method>
  <thread>1</thread>
  <message>Unable to find the element located by &amp;apos;By.xpath: //div[@id=&amp;apos;wrapper&amp;apos;]/nav/div[4]/ul/li/a/i&amp;apos;. Please recheck the objects properties to make sure the desired element is located. </message>
  <nestedLevel>1</nestedLevel>
</record>
<record>
  <date>2020-01-09T10:45:55</date>
  <millis>1578584755097</millis>
  <sequence>34</sequence>
  <level>FAILED</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>logMessage</method>
  <thread>1</thread>
  <message>Unable to click on object &amp;apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&amp;apos; (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to click on object &amp;apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&amp;apos;\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)\r\n\tat com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)\r\n\tat com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)\r\n\tat com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)\r\n\tat PruebaAutenticacion.run(PruebaAutenticacion:27)\r\n\tat com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)\r\n\tat com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)\r\n\tat com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)\r\n\tat com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)\r\n\tat com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)\r\n\tat com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)\r\n\tat com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)\r\n\tat TempTestSuite1578584711022.run(TempTestSuite1578584711022.groovy:35)\r\nCaused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: &amp;apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&amp;apos; located by &amp;apos;By.xpath: //div[@id=&amp;apos;wrapper&amp;apos;]/nav/div[4]/ul/li/a/i&amp;apos; not found\r\n\tat com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1097)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:77)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)\r\n\tat com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)\r\n\tat com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)\r\n\tat com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)\r\n\tat Script1576842874281.run(Script1576842874281.groovy:27)\r\n\t... 13 more\r\n)</message>
  <nestedLevel>1</nestedLevel>
  <property name="failed.exception.class">com.kms.katalon.core.webui.exception.WebElementNotFoundException</property>
  <property name="attachment">1578584754696.png</property>
  <property name="failed.exception.stacktrace">com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: &apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&apos; located by &apos;By.xpath: //div[@id=&apos;wrapper&apos;]/nav/div[4]/ul/li/a/i&apos; not found\r\n\tat com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1097)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:77)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)\r\n\tat com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)\r\n\tat com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)\r\n\tat com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)\r\n\tat com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)\r\n\tat com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)\r\n\tat PruebaAutenticacion.run(PruebaAutenticacion:27)\r\n\tat com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)\r\n\tat com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)\r\n\tat com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)\r\n\tat com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)\r\n\tat com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)\r\n\tat com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)\r\n\tat com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)\r\n\tat com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)\r\n\tat TempTestSuite1578584711022.run(TempTestSuite1578584711022.groovy:35)\r\n</property>
  <property name="failed.exception.message">Web element with id: &apos;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home&apos; located by &apos;By.xpath: //div[@id=&apos;wrapper&apos;]/nav/div[4]/ul/li/a/i&apos; not found</property>
</record>
<record>
  <date>2020-01-09T10:45:55</date>
  <millis>1578584755107</millis>
  <sequence>35</sequence>
  <level>END</level>
  <class>com.kms.katalon.core.logging.XmlKeywordLogger</class>
  <method>endKeyword</method>
  <thread>1</thread>
  <message>End action : click(findTestObject(\&amp;quot;Object Repository/Nuevo/Page_Contactos Tesorera - Contactos de Tesorera/i_Inicio_fas fa-home\&amp;quot;))</message>
  <nestedLevel>1</nestedLevel>
</record>

Also, the pictures with the error evidence are in blank and the video of the test is black.

Additionally, Those are the parameters in the katalon agent:

Use pre-installed Katalon Studio: E:\Katalon\6.3.3
Command arguments: -runMode=console  -consoleLog -browserType="Chrome"  -reportFolder="Reports"  -reportFileName="report"  -retry=0  -statusDelay=15  -testSuitePath="Test Suites/Clientes/PruebaValidacion"  -executionProfile=default 

Thank you for your help!

Unable to find the element located by &amp;apos;By.xpath: //div[@id=&amp;apos;wrapper&amp;apos;]/nav/div[4]/ul/li/a/i&amp;apos;. Please recheck the objects properties to make sure the desired element is located.

On one machine your test runs successful, but on another machine the test fails. This implies a timing problem. On one machine the target element appears quick enough, but on another machine the target element appears a bit slowly. The speed difference might be small in milli-seconds, but timing is significant for WebUI.click operation. I suppose you should tune your test case a bit more robust for timing issue.

Before clicking the target element, do waitForElementClickable(target, timeout). See

Hello. Thank you for your answer.

In this case, the machine is the same. In the first case, I run the test manually on the server in console; in the second case, The Azure DevOps Agent run the test.

In the two cases used the same Katalon installation.

Regards.

Hi @jyepes

Do you notice a difference in execution speed between two environments ?
Perhaps you should try to wait for that element before acting on it, as @kazurayam suggested.