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

**URL:** https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741
**Category:** Get Help & Discuss
**Tags:** process-studio, rpa
**Created:** [June 22, 2021, 2:57pm UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741 "2021-06-22T14:57:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)
#### Post date: [June 22, 2021, 2:57pm UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741/1 "2021-06-22T14:57:38Z")

</div>

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

 ![airbnb](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/5714bbecc4cdb7ed0b03068cf718c2ac53ede1e0.png)

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?

---

<div class="post-metadata">

### Author: ![rakesh.kale](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rakesh.kale](https://community.automationedge.com/u/rakesh.kale)
#### Post date: [June 23, 2021, 4:09am UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741/2 "2021-06-23T04:09:55Z")

</div>

Hi Shubham,

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

> **[Get all links present on a webpage using Selenium WebDriver with Java.](https://artoftesting.com/get-all-links-in-a-webpage-selenium-webdriver-java)**
>
> Sample code to get all links present on a webpage using Selenium WebDriver with Java.

---

<div class="post-metadata">

### Author: ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)
#### Post date: [June 23, 2021, 4:40am UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741/3 "2021-06-23T04:40:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![rakesh.kale](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rakesh.kale](https://community.automationedge.com/u/rakesh.kale)
#### Post date: [June 23, 2021, 5:38am UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741/4 "2021-06-23T05:38:29Z")

</div>

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;

---

<div class="post-metadata">

### Author: ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)
#### Post date: [June 23, 2021, 5:56am UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741/5 "2021-06-23T05:56:31Z")

</div>

Ok !'m trying to get

---

<div class="post-metadata">

### Author: ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)
#### Post date: [June 23, 2021, 8:25am UTC](https://community.automationedge.com/t/how-to-get-and-store-the-url-of-page-without-clicking-on-the-link/3741/6 "2021-06-23T08:25:02Z")

</div>

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)

 ![error](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/d25a6b4a4e7aeb3f7ce2709ffbef00551235d71e.png)
