0
6

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.

Python, Selenium 取得したbuttonのWebElementがクリックできるかどうかを判断する方法

Posted at

取得したbuttonのWebElementがクリックできるかどうか

element_to_be_clickable()で取得できると思ったんですが、だめでした。
is_enabled()を使えば良いようです。

button = driver.find_element_by_css_selector('#app > div:nth-child(2) > div > div.animation-content > div > footer > div > button')
if button.is_enabled():
    button.click()

参考

7. WebDriver API — Selenium Python Bindings 2 documentation

0
6
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
0
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?