0

I want to get a link in html path, the codes are here:

<div class="btn btn-primary btn-lg"> 
      <a href="https://storage.googleapis.com/audiog-204018.appspot.com/files/hello1574358335.mp3"> 
      Download MP3 </a>
</div>

How can i get this link with selenium

1
  • Welcome to SO. Please take the time to read How to Ask and minimal reproducible example. It will help you craft solid questions that will hopefully get useful answers. In this case, you should post the selenium code that you wrote to address your issue to demonstrate you've made an effort. Commented Nov 21, 2019 at 18:35

1 Answer 1

1

In Python Selenium you can simply use element.get_attribute()

So in your case, it should just be

element.get_attribute("href")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.