I am using Selenium and Python to scrape data from the iHerb website. However, I am encountering a captcha that is preventing me from successfully extracting the desired information. How can I overcome this captcha challenge and proceed with the scraping process?
I attempted to use Selenium actions to press and hold an element, but it was unsuccessful because it is located within a shadow root containing an iframe.
I tried the code
`
element = driver.find_element_by_css_selector('#px-captcha')
action = ActionChains(driver)
action.click_and_hold(element)
action.perform()
time.sleep(10)
action.release(element)
action.perform()
time.sleep(0.2)
action.release(element)
You need to sign in to view this answers