Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Last active May 26, 2017 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/d97cc32d0cb0a643dc86587ace532698 to your computer and use it in GitHub Desktop.
Save kurozumi/d97cc32d0cb0a643dc86587ace532698 to your computer and use it in GitHub Desktop.
【Python】Seleniumを使ってjQueryが読み込まれるまで待つ方法
driver = webdriver.Firefox()
driver.get("https://mixi.jp")
WebDriverWait(driver, 30).until(
lambda driver: driver.execute_script('return !!window.jQuery && window.jQuery.active == 0')
)
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment