[Answer]-How can I use Selenium to verify the href URL's are properly formed?

1👍

Hy,

It seems that you are not closing the parentheses of the method matches

Try:

self._driver.find_element_by_xpath("//a[matches(@href, '/post/(?P<id>\d+)/test_post')]")

Leave a comment