How To Get Image Source In Selenium Webdriver. In this case, we use either by.cssselector or. In this tutorial, we learn about handling images using selenium webdriver.

An image in an html document has tagname. To fetch any attribute in selenium, we have to use the getattribute() method. Use the save picture dialog box to find a location to save the picture.