Skip to content

Instantly share code, notes, and snippets.

@seleniumgists
Created July 23, 2020 14:22
Show Gist options
  • Select an option

  • Save seleniumgists/0b224baa90e4efa57eef5ac6f7c210dd to your computer and use it in GitHub Desktop.

Select an option

Save seleniumgists/0b224baa90e4efa57eef5ac6f7c210dd to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
driver.find_element_by_xpath("//div[@aria-rowindex=7][@aria-colindex=10]//child::span[1]").click() #click will take me to a new ajax page - no change in url
driver.implicitly_wait(60)
time.sleep(160) #without this the below a.png is still behind before my previous click
driver.save_screenshot('a.png') #new url page is in screenshot properly.
#working fine until this line
driver.implicitly_wait(60)
print(driver.page_source) #still in old page's page_source and the below xpath is not available here
WebDriverWait(driver, 60).until(EC.element_to_be_clickable((By.XPATH, "//button[@button_id='fuseBlowView']"))).click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment