Shadow Dom click error katalon version 5.2

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

‘Open browser and navigate to the AUT website’

WebUI.openBrowser(‘JavaScript Books’)

‘Click on the destination book store link’

WebUI.click(findTestObject(‘aStoreLink’))

‘Delay 5s to view the result’

WebUI.delay(5)

‘Verify that a new window is opened’

WebUI.switchToWindowTitle(‘Object-Oriented JavaScript, 2nd Edition: Stoyan Stefanov, Kumar Chetan Sharma: 9781849693127: Amazon.com: Books’)

‘Close the browser to clean up’

WebUI.closeBrowser()

run case error:

12-26-2017 07:42:39 下午 - [INFO] - Navigating browser to: ‘JavaScript Books

12-26-2017 07:42:46 下午 - [PASSED] - Browser is opened with url: ‘JavaScript Books

12-26-2017 07:42:46 下午 - [END] - End action : openBrowser

12-26-2017 07:42:46 下午 - [START] - Start action : click

12-26-2017 07:42:46 下午 - [INFO] - Finding Test Object with id ‘Object Repository/aStoreLink’

12-26-2017 07:42:46 下午 - [INFO] - Finding Test Object with id ‘Object Repository/sectionAllBooks’

12-26-2017 07:42:46 下午 - [INFO] - Checking object

12-26-2017 07:42:46 下午 - [INFO] - Checking timeout

12-26-2017 07:42:46 下午 - [INFO] - Web element with id: ‘Object Repository/aStoreLink’ have parent shadow root with id: ‘Object Repository/sectionAllBooks’

12-26-2017 07:42:46 下午 - [INFO] - Checking timeout

12-26-2017 07:42:46 下午 - [INFO] - Finding web element with id: ‘Object Repository/sectionAllBooks’ located by ‘By.xpath: //*[@id = ‘allBooks’]’ in ‘30’ second(s)

12-26-2017 07:42:46 下午 - [INFO] - Found 1 web elements with id: ‘Object Repository/sectionAllBooks’ located by ‘By.xpath: //*[@id = ‘allBooks’]’ in ‘30’ second(s)

12-26-2017 07:42:46 下午 - [INFO] - Finding web element with id: ‘Object Repository/aStoreLink’ located by ‘*[href=“http://www.amazon.com/gp/product/1849693129/ref=as\_li\_qf\_sp\_asin\_il\_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ”]’ in ‘30’ second(s)

12-26-2017 07:42:46 下午 - [INFO] - Found 1 web elements with id: ‘Object Repository/aStoreLink’ located by ‘*[href=“http://www.amazon.com/gp/product/1849693129/ref=as\_li\_qf\_sp\_asin\_il\_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ”]’ in ‘30’ second(s)

12-26-2017 07:43:17 下午 - [INFO] - Found 1 web elements with id: ‘Object Repository/aStoreLink’ located by ‘*[href=“http://www.amazon.com/gp/product/1849693129/ref=as\_li\_qf\_sp\_asin\_il\_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ”]’ in ‘30’ second(s)

12-26-2017 07:43:17 下午 - [INFO] - Found 1 web elements with id: ‘Object Repository/aStoreLink’ located by ‘*[href=“http://www.amazon.com/gp/product/1849693129/ref=as\_li\_qf\_sp\_asin\_il\_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ”]’ in ‘30’ second(s)

12-26-2017 07:43:18 下午 - [FAILED] - Unable to click on object ‘Object Repository/aStoreLink’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/aStoreLink’ located by 'By.xpath: //*[@href = 'http://www.amazon.com/gp/product/1849693129/ref=as\_li\_qf\_sp\_asin\_il\_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ’\]’ not found)

12-26-2017 07:43:18 下午 - [FAILED] - Test Cases/Shadow DOM Test FAILED because (of) Unable to click on object ‘Object Repository/aStoreLink’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/aStoreLink’ located by 'By.xpath: //*[@href = 'http://www.amazon.com/gp/product/1849693129/ref=as\_li\_qf\_sp\_asin\_il\_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ’\]’ not found)

12-26-2017 07:43:18 下午 - [END] - End action : click

12-26-2017 07:43:18 下午 - [END] - End Test Case : Test Cases/Shadow DOM Test

Hi tianmaomade,

This is the root cause:
“Web element with id: ‘Object Repository/aStoreLink’ located by 'By.xpath: //*[@href = 'http://www.amazon.com/gp/product/1849693129/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ’]’ not found”

So to resolve this issue, please help to adjust your object’s properties. We suggest not using ‘href’ property in your case because that link you’ve provided is likely a dynamic link and will be changed for each run time.

hi,please look at this:
12-26-2017 07:43:17 下午 - [INFO] - Found 1 web elements with id: ‘Object Repository/aStoreLink’ located by ‘*[href=“http://www.amazon.com/gp/product/1849693129/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1849693129&linkCode=as2&tag=kaidez-20&linkId=CK7X5SMYEHL3BMEQ”]’ in ‘30’ second(s)

tool has been found the element within 30 seconds, but the tool did not perform the click operation.

I use the following example:

this example run error in katalon 5.2version

Hi there,

I can see your issue now. Based on my observation, it is an issue and we’ve logged a ticket to fix it.

Regards

I also have the same issue with 5.2… is this resolved in 5.3?

i just checked and it is working with 5.3 …