0

I am completely new to java and I want to check if the text inside div element equals to a specific value by giving the xpath. For example if the text equals to "value 1" the test passes other wise it shows a message. I am not sure how to use assertEquals with xpath. can you give me some hints?

<div id="indicator">value 1 </div>

thanks

user3409650
  • 505
  • 3
  • 12
  • 25

1 Answers1

-1

Are you using javascript or jsp?

Any Case is easy, this will return your value:

$("#MyId").val();

In your case it would be:

$("#indicator").val(); 
Cesar Villasana
  • 681
  • 3
  • 6