Cannot click on path under svg element

Hello, i need some help. I need to click on a path item inside svg, RPA can find the item but i cannot click i tried all locators but none works.

The browser inspector css route is:

html.notranslate.react-use-css-0 body div#root.root div.layout.obt-background-image.react-use-css-0.is-studio.desktop.layout–obt-initialized div.layout__content main.layout__main div.layout__main-content.squared div.react-use-css-1-mode.-catalog.XL svg.cat-svg svg#choose path#n11

What i resumed to:

css=#root > div > div > main > div > div > svg > svg > path#n11

Also works as:

css=#root > div > div > main > div > div > svg > svg > path:nth-child(52)

as path:nth-child(52) is the css locator. But only works to find, not to click

If i try to use xpath then i get only:

//*[@id=“n11”] that dont work all at because it finds another item but if i get the HTML:

<path id="n11" data-testid="XL_Catalog_item_11" opacity="0.745536" fill-rule="available" clip-rule="available" d="M257.855 91.5354V63.7486H285.642V91.5354H257.855Z" fill="#2BDD97"></path>

and build a xpath locator like:

xpath=//*[@data-testid=“XL_Catalog_item_11”]

The same happens, it finds the item but cannot click on it, i searched and find its hard to click on a path under svg like this: svg > svg > path, the only solutions i found are for python and involves wait to be clickable but didnt find how to do in rpa.

Any help?

Thank you

Instead of trying to find the correct XPath, have you considered doing the RPA automation visually with XClick and/or XClickText?

I already have it done visually but is painfully slow and fails quite often.

That could be a javascript issue inside the website. Maybe try your selector plus XClick (instead of click)?

I tried it but for some reason i cannot use xpath neither css locator with xclick it wants an image to click at, also i saw the video tutorials and it seems its easy as change click for xclick but for some reason is not.

imagen

This is the error that appears when i change click for xclick with the same locator

[error] Line 58: empty x

wth is empty x?