You need to use the surrounding context which (presumably) will not change and search for the link within that context regardless of the contents of the link.
One way of doing that:
//h3[text()='Selenium Standalone Server']/following-sibling::p[contains(text(),'Download version')][1]/a
Explanation of the above xpath:
We want the link within the Selenium Standalone Server
section:
//h3[text()='Selenium Standalone Server']
We see the paragraph we are looking for is on the same level as the h3
title, so we use the following-sibling
axis:
//h3[text()='Selenium Standalone Server']/following-sibling::p
This returns many elements, we only want the one with our link which we identify by the Download version
text:
//h3[text()='Selenium Standalone Server']/following-sibling::p[contains(text(),'Download version')]
We are only interested in the first one:
//h3[text()='Selenium Standalone Server']/following-sibling::p[contains(text(),'Download version')][1]
And we are looking for the link within that paragraph, which is our final xpath:
//h3[text()='Selenium Standalone Server']/following-sibling::p[contains(text(),'Download version')][1]/a
Hope this helps!