Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98357

trying scrape this page with selenium and python

$
0
0

I'm trying to scrape this page/iframe with selenium/python but I can't insert any text in this selected form.

link

from selenium import webdriver
from time import sleep

driver = webdriver.Firefox()
url = 'http://web.transparencia.pe.gov.br/despesas/despesa-geral/'
driver.get(url)
sleep(10)
driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
el = driver.find_element_by_xpath("//*[@id='html_selectug']")
el.click()

When I try to get the listbox:

el_cl = el.find_element_by_class_name('chzn-select')
el_cl.click()

An exception is raised

selenium.common.exceptions.ElementNotInteractableException: Message: Element <select class="chzn-select"> could not be scrolled into view

any tips?


Viewing all articles
Browse latest Browse all 98357

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>