I want to access an element using selenium web driver using the inside text of a button element.
I want to catch this button element using "next" value.
<button>next</button>
How can I do this?
I want to access an element using selenium web driver using the inside text of a button element.
I want to catch this button element using "next" value.
<button>next</button>
How can I do this?
You can use following xpath
options to get the element with text next
Option1:
//button[text()='next']
Option2:
//button[contains(.,'next')]
Option3:
//button[contains(text(),'next')]