How can I find the link URL by link text with XPath ?
To find the link url by link text with Xpath, follow the given code,
This could an alternative code for finding the link url by the link text with path. Definitely the ‘programming’ can be any text fragment.
The below code will normally identifies an anchor node <a> which has the text that we need, and extracts the href attribute.
//a[text()='programming quesions site']/@href