How to verify element present or visible in selenium 2 (Selenium WebDriver)

前端 未结 7 814
星月不相逢
星月不相逢 2020-11-29 18:41

Any one can send me sample code how to verify element

  1. ispresent
  2. isvisible
  3. isenable
  4. textpresent

in Se

7条回答
  •  [愿得一人]
    2020-11-29 18:55

    To make sure that an element is present you can do the following:

    driver.findElements(By.id("id"));
    

    That will return an array, if that array size is > 0 then the element/s is present.

    Also, you need to provide more information, such as language and what have you tried before asking,

    Good luck

提交回复
热议问题