Storetext saves empty string ""

Hi, i have a web that have a clickable item with a text, i can select and find the item and the clicks works, but when i try to save the text it just return “”
If i tell RPA to select it returns me a CSS string locator, i managed to build an xpath string locator but it find it but still return no text “”
I searched about this problem but all the results are based on java or selenium webdriver, it says i must use gettext() funtion or string into xpath, but i dont know how to do that on RPA

The css RPA get is:

  "Target": "css=#root > div > div > div > div > div > div > div > div > div > div > div > div > div > svg > g > g > text",

the xpath i built is:

“Target”: “//html/body/div[1]/div/div[3]/div[1]/div/div[1]/div[2]/div[8]/div/div[3]/div/div/div[2]/div/svg[1]/g/g/text”,
i also use this xpath:

“Target”: “//[name()=“svg” and @class=“model_selected” and @data-automation-locator=“price”]//[name()=“text” and @class=“label”]”,

every locator is able to find and click but none of them is able to save the text.

In browser F12 external HTML is:

svg xmlns="" viewBox="0 0 144 144" class="model_selected" data-automation-locator="price"><g class="price-animation-wrapper"><use xlink:href="#src/common/prices/price/images/price-template" style="fill: rgb(170, 27, 27);"></use><g transform="translate(72 72)"><text text-anchor="middle" class="price__label" style="fill: rgb(0, 0, 0);" dy="0.88em">500€</text></g></g></svg

I want to save the 500€

Any help is welcome thank you.

Maybe try sourceExtract?


Works like a charm.

1 Like