Jump to content

How to get the value of XPath element?


AI123
 Share

Recommended Posts

Hello, is there a way to get the value of a Xpath element?

I have:

;Full XPath:
/html/body/div/div[1]/ui-view/div/div/div/div/div[2]/div[2]/article/div[2]/div/div[1]/span
;value of span
<span data-v-9eab177c="" class="text-truncate">Noch nicht veröffentlicht</span>

I can get the handle then with

Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div/div[1]/ui-view/div/div/div/div/div[2]/div[2]/article/div[2]/div/div[1]/span")

But I want the value of the element ("Noch nicht veröffentlicht") not the handle.

So is there a way to get the element value if I have the XPath?

Edited by AI123
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...