-1

I have the following code and I am trying to address or read "HERE", using xpath.I am programming java and using page.getFirstByXPath method:

...
 <label item = "aaa">
  <input class = "bbb"/>
  <span class = "ccc">
  <span/>
  HERE
 <label/>
...

Cheers

pix
  • 58
  • 7

1 Answers1

0

Try this

driver.findElement(By.xpath("//label[@item='aaa']")).getText();
Arun
  • 875
  • 3
  • 10
  • 17