TestObject with xpath property doesn't work with Chrome 76

TestObject with xpath property doesn’t work with Chrome 76 and Katalon 6.3.2

Hi,

  • Please find my code just below :
    TestObject dynamicTo = new TestObject().addProperty(‘xpath’, ConditionType.EQUALS, dynamicXPath, true)
    WebUI.waitForElementVisible(dynamicTo, 10)

We tested with Katalon 5.9.1 : the same code works very well

  • Crash of the method waitForElementVisible
  • It works very well with Firefox but we have a bug with Chrome (v76) since august.
  • it works with Chrome with css but not with xpath.
  • Logs :
    2019-08-19 16:44:42.857 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to wait for object ‘’ to be visible (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to wait for object ‘’ to be visible
    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.WaitForElementVisibleKeyword.waitForElementVisible(WaitForElementVisibleKeyword.groovy:99)
    at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword.execute(WaitForElementVisibleKeyword.groovy:68)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.waitForElementVisible(WebUiBuiltInKeywords.groovy:434)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$waitForElementVisible$11.call(Unknown Source)
    at divers.CustomKeywordsPerso.creerTestObjectAvecXPath(CustomKeywordsPerso.groovy:171)
    at divers.CustomKeywordsPerso$creerTestObjectAvecXPath$0.call(Unknown Source)
    at actesCCAM.ActeCCAM.rechercherCodeActeCCAM(ActeCCAM.groovy:321)
    at actesCCAM.ActeCCAM.ajouterUnActeCCAM(ActeCCAM.groovy:246)
    at actesCCAM.ActeCCAM.invokeMethod(ActeCCAM.groovy)
    at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
    at Ajouter et supprimer un acte CCAM.run(Ajouter et supprimer un acte CCAM:5)
    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:337)
    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
    at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
    at TempTestCase1566225646177.run(TempTestCase1566225646177.groovy:21)
    Caused by: java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:365)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:432)
    at org.openqa.selenium.By$ByXPath.findElements(By.java:348)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:311)
    at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElements(WebUiCommonHelper.java:761)
    at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1093)
    at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
    at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword$_waitForElementVisible_closure1.doCall(WaitForElementVisibleKeyword.groovy:80)
    at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword$_waitForElementVisible_closure1.call(WaitForElementVisibleKeyword.groovy)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
    at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword.waitForElementVisible(WaitForElementVisibleKeyword.groovy:99)
    at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword.execute(WaitForElementVisibleKeyword.groovy:68)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.waitForElementVisible(WebUiBuiltInKeywords.groovy:434)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$waitForElementVisible$11.call(Unknown Source)
    at divers.CustomKeywordsPerso.creerTestObjectAvecXPath(CustomKeywordsPerso.groovy:171)
    at divers.CustomKeywordsPerso$creerTestObjectAvecXPath$0.call(Unknown Source)
    at actesCCAM.ActeCCAM.rechercherCodeActeCCAM(ActeCCAM.groovy:321)
    at actesCCAM.ActeCCAM.ajouterUnActeCCAM(ActeCCAM.groovy:246)
    at actesCCAM.ActeCCAM.invokeMethod(ActeCCAM.groovy)
    at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
    at Script1563979432661.run(Script1563979432661.groovy:5)
    … 10 more

Thank you and let me know if you need more information !

Possible cause:

The element can’t be detected on the current page due to the incorrect XPath or CSS selectors.

Suggested solutions:

You can try one of the following solutions to resolve the issue:

Correct the element’s XPath locator. Here is how to identify XPath:
Open your page using Chrome.
Right-click on your desired test object and choose Inspect
In the Elements tab of DevTools, right-click on your target object and select Copy > Copy XPath.
Open your test object in Katalon Studio, update XPath property with the copied value.
Optimize object identification and tools
“selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted.”
Possible causes:

The element is hidden and is not ready.
The element is not visible yet after the current page is loaded.