1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Selenium Alert Confirm Box のOK キャンセルボタン押下

Posted at

SeleniumでAlert Confirm Boxを操作する。

下記をOKしたい場合
image.png
image.png

from selenium import webdriver
from selenium.webdriver.common.alert import Alert

driver = webdriver.Chrome("driverPath")

# OKボタン押下
Alert(driver).accept()

# キャンセルボタン押下
Alert(driver).dismiss()

環境情報

IDE

image.png

Python

python-3.9.1

OS

image.png

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?