Python Selenium: Can't enter a webpage using my script

0 votes

I've written a script in python with selenium to enter a webpage and scrape some names out of it. However, when I enter the webpage, it requires the browser to do a human verification test solving captcha. I tried to tick the box next to captcha, but it doesn't seem to work at all. How can I enter the webpage and source some names in this situation?

This is what I've tried so far:

from selenium import webdriver

from import By

from import WebDriverWait

from import expected_conditions as EC

driver = webdriver.Chrome()

wait = WebDriverWait(driver, 10)



    wait.until(EC.presence_of_element_located((By.ID, "recaptcha-anchor"))).click()


for item in wait.until(EC.presence_of_all_elements_located((By.CSS_SELECTOR,".row .h4"))):



The link This_One to be used within the scraper.

Elements within the captcha embedded:

<div class="rc-anchor-content"><div class="rc-inline-block"><div class="rc-anchor-center-container"><div class="rc-anchor-center-item rc-anchor-checkbox-holder"><span class="recaptcha-checkbox goog-inline-block recaptcha-checkbox-unchecked rc-anchor-checkbox recaptcha-checkbox-hover" role="checkbox" aria-checked="false" id="recaptcha-anchor" tabindex="0" dir="ltr" aria-labelledby="recaptcha-anchor-label"><div class="recaptcha-checkbox-border" role="presentation"></div><div class="recaptcha-checkbox-borderAnimation" role="presentation"></div><div class="recaptcha-checkbox-spinner" role="presentation"></div><div class="recaptcha-checkbox-spinnerAnimation" role="presentation"></div><div class="recaptcha-checkbox-checkmark" role="presentation"></div></span></div></div></div><div class="rc-inline-block"><div class="rc-anchor-center-container"><label class="rc-anchor-center-item rc-anchor-checkbox-label" aria-hidden="true" role="presentation" id="recaptcha-anchor-label"><span aria-labelledby="recaptcha-accessible-status"></span>I'm not a robot</label></div></div></div>

Jul 31, 2018 in Selenium by Martin
• 4,210 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
CAPTCHA is used to stop website automation & that's why it cannot be automated using selenium. Adn for same reason, your not able to select CAPTCHA tick box.
answered Jul 31, 2018 by Samarpit
• 5,130 points

Related Questions In Selenium

0 votes
2 answers
0 votes
1 answer

How to upload a resume to a website using selenium in python?

Use this code, this will help you: from ...READ MORE

answered Apr 20, 2018 in Selenium by Vardy
• 2,280 points
0 votes
1 answer

How to click a span with given text using Selenium Python

If ALL_USA is subject to change, then ...READ MORE

answered Jul 26, 2018 in Selenium by Samarpit
• 5,130 points
0 votes
1 answer
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8 in Selenium by Anvi
• 5,880 points
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
0 votes
1 answer

How to login a forum using Selenium with Python

You should try to directly log in ...READ MORE

answered Apr 27, 2018 in Selenium by Samarpit
• 5,130 points
+1 vote
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.