1

Is there any way to pull links from href values and open them one by one, and perform an action (click) on a specific ID?

1
  • 1
    welcome to SO! please read minimal reproducible example and edit your post accordingly Commented Mar 11, 2021 at 9:01

1 Answer 1

2

First, find element by ID

element = driver.find_element_by_id('YOUR_ID')

Second, get attribute from your element

link = element.get_attribute("href")

Third, use selenium, but I would suggest using something like requests, and perform GET request by this link:

import requests
response = requests.get(link)
assert response.status_code == 200

for example

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.