I want to locate the image
tag in a webpage. The application contains a VIEW ICON. While inspecting the view icon, it is coded as image
tag. I am not s
Can you please execute the code below and let me know what you get. System.out.println(driver.findElements(By.tagName(“image”)).size());
if you still get null pointer exception , there is something wrong with your driver object . This code should return 0 if no image tag found on page , else the number of image tags on that page
Depending on the number of image tags , you can decide on the index of image tag you want to click , and then execute click on that element