selenium + python switch_to_window -
selenium + python switch_to_window -
i'm writing scraper requires selecting link open new window. activate window , check activated, utilize :
driver.switch_to_window(driver.window_handles[1]) driver.title print title
it worked 1 time , never again. did other check create recognizing windows existence , does, yet not switch:
print len(driver.window_handles) print driver.window_handles
i'm using next website:
chromedriver = 'c:\python27\drivers\chromedriver' driver = webdriver.chrome(chromedriver) driver.get("https://ccrecordse.tarrantcountytx.gov/realestate/searchentry.aspx")
the programme enters dates + lease documents, moves next page, clicks document icons open new window, not switch new window. cannot figure out why.
thanks help , allow me know if need provide more info in question!
i opened window using get_element_by_id.click(). seems capturing alter incorrectly, , if print driver.title, shows right handler. give thanks you!
python selenium
Comments
Post a Comment