Best way to check that element is not present using Selenium WebDriver with java

后端 未结 9 1994
半阙折子戏
半阙折子戏 2020-12-24 02:33

Im trying the code below but it seems it does not work... Can someone show me the best way to do this?

public void verifyThatCommentDeleted(final String text         


        
9条回答
  •  感动是毒
    2020-12-24 02:52

    In Python for assertion I use:

    assert len(driver.find_elements_by_css_selector("your_css_selector")) == 0
    

提交回复
热议问题