Selenium - check if an image is displayed on page

后端 未结 5 1444
天涯浪人
天涯浪人 2020-12-12 23:25

I\'m creating a suite of Selenium tests for an web album application. I would like to test whether an image is actually displayed (it contains valid image data). Is such thi

5条回答
  •  情歌与酒
    2020-12-12 23:45

    You can certainly check that the image appears in the page source e.g. by using a XPath parameter.

    You can assume that because it is in the page source, it will be displayed but I don't know of any way to actually validate this.

提交回复
热议问题