I want to get (and store to variable) url of one hyperlink (link) on the web page. Is it possible to get it in the Selenium IDE?
In my test I have to verify, if link exists, then store url from this link and use it later in the test.
Thanks.
driver.findElement(By.xxx).getAttribute('href');
Although this question was originally asked for the IDE, I just came here through Google searching for the same answer for Python.
The one above gives
AttributeError: 'WebElement' object has no attribute 'getAttribute'
because for Python it is
driver.find_element(By.xxx).get_attribute('href')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With