In python selenium, how does one find the visibility of an element?

前端 未结 2 1391
半阙折子戏
半阙折子戏 2021-02-02 05:55

I found the is_visible method in the Selenium documentation, but I have no idea how to use it. I keep getting errors such as is_visible needs a selenium instance as the fi

2条回答
  •  借酒劲吻你
    2021-02-02 06:49

    From here: https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html

    Just use

    selenium.webdriver.support.expected_conditions.visibility_of

    cos

    Visibility means that the element is not only displayed but also has a height and width that is greater than 0

提交回复
热议问题