I\'m trying to locate a link using Selenium Webdriver. I don\'t wanna locate it by link text, only the actual link which is typed in . This can be done by using Selenium\'s find
You can use the start-with
in xpath to locate an attribute value that starts with a certain text.
For example, assume you have the following link on the page:
link text
Then you can use the following xpath to find links that have an href that starts with 'mylink':
//a[starts-with(@href, "mylink")]