Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created February 15, 2016 14:02
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/2e4409788c97d2402066 to your computer and use it in GitHub Desktop.
Save kurozumi/2e4409788c97d2402066 to your computer and use it in GitHub Desktop.
【Python】SeleniumでアラートのOKをクリックする方法
from selenium import webdriver
from selenium.webdriver.common.alert import Alert
driver = webdriver.Firefox()
driver.get("http://sample.com")
Alert(driver).accept()
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment