Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ElementNotVisibleException: Message: element not visible
- from urllib import parse
- from selenium import webdriver
- from selenium.webdriver.support.ui import Select
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.common.keys import Keys
- class ICAIScraper(object):
- def __init__(self):
- self.url = "https://www.icaionlineregistration.org/Admin_Module/Login.aspx"
- self.driver = webdriver.Chrome('C:\chromedriver.exe')
- def scrape(self):
- self.driver.get(self.url)
- wait = WebDriverWait(self.driver, 10)
- wait.until(lambda driver: driver.find_element_by_id('txt_username').is_displayed() == False)
- print('Yay! on the first page')
- username = self.driver.find_element_by_id('txt_username')
- username.click()
- username.send_keys('username')
- password = self.driver.find_element_by_id('txt_password')
- password.send_keys('password')
- password.send_keys(Keys.ENTER)
- self.driver.quit()
- if __name__ == '__main__':
- scraper = ICAIScraper()
- scraper.scrape()
Add Comment
Please, Sign In to add comment