How to get and store the URL of page without clicking on the link?

I search the lonavla on airbnb site to get the list of hotel or house(see snapshot).

each of the resultant list is like link, when we click on it, it opens the new webpage.
I want to store all that link without clicking on it?

Hi Shubham,

You have to write a java code to get all the links on the page. Kindly refer to below link:

I’m not sure that the driver and other package imported in the code (Above Link) will also be imported in user defined java class plugin. I’’ try. If you could provide how to import these package in user defined java class will be better.

Hi Shubham,

You can import the packages directly in the plugin using the import keyword.

For ex:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

Ok !'m trying to get

I’m getting the error like cannot find the firefox binary path.
I have installed firefox and also set in the env variable at default location(C:\Program Files (x86)\Mozilla Firefox\firefox.exe)