Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created May 26, 2017 05:11
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/64dd737385cc11a0796ce26fef194c32 to your computer and use it in GitHub Desktop.
Save kurozumi/64dd737385cc11a0796ce26fef194c32 to your computer and use it in GitHub Desktop.
【Python】Seleniumを使って要素が表示されたかどうか確認する方法
driver = webdriver.Firefox()
driver.get("https:www.google.co.jp")
element = driver.find_element_by_tag_name("body")
# 表示されていればTrueを返す
print(element.is_displayed())
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment