0

I want to scrape a local website using selenium and need to send Username and Password to be logged in but there is no inspect element to find these elements. The website is like this: enter image description here

1

2 Answers 2

1

To send keys to popup using Selenium, you can first switch your target to the popup

obj = driver.switch_to.alert

Then send keys using

obj.send_keys(username)
obj.send_keys(str(Keys.TAB)) # send a tab to go to the next field
obj.send_keys(password)

Reference: Handle alert popup inselenium

Sign up to request clarification or add additional context in comments.

Comments

0

First of all, try this URL format in driver.get():

http://username:[email protected]

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.