# Get Current URL

**URL:** <https://forum.uipath.com/t/get-current-url/96856>\
**Category:** Help\
**Tags:** uiautomation, activities\
**Created:** [February 21, 2019, 3:56am UTC](https://forum.uipath.com/t/get-current-url/96856 "2019-02-21T03:56:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheri](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Sheri](https://forum.uipath.com/u/Sheri)\
**Post date:** [February 21, 2019, 3:56am UTC](https://forum.uipath.com/t/get-current-url/96856/1 "2019-02-21T03:56:31Z")

</div>

Hi guys

I’m looking for a quick and effective way to retrieve the current URL in the current browser window I am attached to.

I’ve looked in the forums for some examples, and some name “Get Attribute” but I just can’t seem to get them to work!

Would appreciate any advice. I need to retrieve the current (lengthy) URL and string-split it to get a certain string of numbers out of it.

Thanks!

---

<div class="post-metadata">

**Author:** ![zheng.tan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/zheng.tan/32/56673_2.png) [@zheng.tan](https://forum.uipath.com/u/zheng.tan)\
**Post date:** [February 21, 2019, 5:24am UTC](https://forum.uipath.com/t/get-current-url/96856/2 "2019-02-21T05:24:06Z")

</div>

`Get Attribute` activity should work.  
Set its selector to any stable element on the web page and set the `Attribute` property to “url” (with the double quotes - type the double quotes in and do not copy from this page, or better yet, just select `url` from the drop down list of the activity in the workflow) and set `Result` property to a variable (create one if there’s none).  
The variable should contain the url after running the `Get Attribute` activity.

---

<div class="post-metadata">

**Author:** ![pavanh003](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pavanh003/32/51992_2.png) [@pavanh003](https://forum.uipath.com/u/pavanh003)\
**Post date:** [February 21, 2019, 8:39pm UTC](https://forum.uipath.com/t/get-current-url/96856/3 "2019-02-21T20:39:19Z")

</div>

Hi,  
This might help you:  
Refer the attachment workflow,  
Please post if this helps:

[Main.xaml](https://global.discourse-cdn.com/uipath/original/3X/5/4/54fdb642eb4b7898e5f7c4cabed82fdb23667eac.xaml) (5.5 KB)

---

<div class="post-metadata">

**Author:** ![Sheri](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Sheri](https://forum.uipath.com/u/Sheri)\
**Post date:** [February 25, 2019, 11:53pm UTC](https://forum.uipath.com/t/get-current-url/96856/4 "2019-02-25T23:53:32Z")

</div>

This worked perfectly, thank you so very much!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [February 28, 2019, 11:53pm UTC](https://forum.uipath.com/t/get-current-url/96856/5 "2019-02-28T23:53:35Z")

</div>

Closed on February 28, 2019, 11:53pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
