Selenium Command

前端 未结 4 1285
逝去的感伤
逝去的感伤 2020-12-22 06:38

When we use selenium command at that time command not find and attribute not get? See below command.



        
      
      
      
4条回答
  •  感动是毒
    2020-12-22 06:44

    Xpath //div[2]@class central-featured is invalid. Try changing it to //div[@class='central-featured']/@class if you mean to select a class. You could also use assertElementPresent function instead of selecting attribute, if the whole point is to check that element exists, i.e.:

Much simpler that way.

提交回复
热议问题
open
assertElementPresentxpath=//div[@class='central-featured']