How to extract an image in Selenium?
I am new to selenium and I am currently trying to extract the image on the "Product Image" section of an Amazon product page.
I want to extract all the images that are on this section and then print them to a list. However, I can't figure out how to do that. I am not sure if this is the best way to do this or not.
This is what I tried: public void clickOnImage(String url) throws IOException. public void getProductImages() throws IOException. }
The error that I am getting is: Exception in thread "main" java.lang.NullPointerException
You are calling findElements() on the driver which is null at the moment. You need to call it on the page you are clicking on.
Related Answers
How can we use the Selenium tool with HeadSpin?
Selenium is a tool that is used to automate functional testing. There are two types...
What are 5 Uses of Selenium?
Selenium is a web-automation tool that helps you to test web applications....
How can we use the Selenium tool with HeadSpin?
Selenium is a cross-browser testing automation framework w...