Thursday, 27 August 2015

Image found or not

if source code of image is:
<img src="/images/abc.png" />

code:
a=driver.find_element_by_xpath("//img[contains(@src,'/images/abc.png')]") if a.is_displayed(): b="Element found" else: b="Element not found"

No comments:

Post a Comment