1

Method storeAttribute works perfectly when I need to get an attribute like href:

xpath=(//span[@class='active'])@href

But how should I use it to get the whole element (span in this example)? I mean the whole html source text of the element.

dereks
  • 544
  • 1
  • 8
  • 25

1 Answers1

1

You can do this just with the storeText command.

So your target would be just:

xpath=(//span[@class='active'])

Set Command to storeText and set Value to the name of the desired variable.

Milkmannetje
  • 1,152
  • 1
  • 10
  • 35
  • Thank you, but it's not working. `storeText` is looking at DOM, not at the html source text. With this thing you can get only visible text. Try this command `xpath=(//div[@id='gallery-item'])` here `https://www.aliexpress.com/category/200000782/suits-sets.html` – dereks Jul 10 '19 at 15:24