WebDriverWait not working as expected

Once you wait for the element and moving forward as you are trying to invoke click() method instead of using presence_of_element_located() method you need to use element_to_be_clickable() as follows : try: myElem = WebDriverWait(self.browser, delay).until(EC.element_to_be_clickable((By.XPATH , xpath))) Update As per your counter question in the comments here are the details of the three methods : … Read more

how to scrape web page that is not written directly using HTML, but is auto-generated using JavaScript? [closed]

Run this script and I suppose it will give you everything the table contains including a csv output. import csv from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = webdriver.Chrome() wait = WebDriverWait(driver, 10) outfile = open(‘table_data.csv’,’w’,newline=””) writer = csv.writer(outfile) driver.get(“http://washingtonmonthly.com/college_guide?ranking=2016-rankings-national-universities”) wait.until(EC.frame_to_be_available_and_switch_to_it(“iFrameResizer0”)) wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, ‘table.tablesaw’))) … Read more