# Get Url return URL on new tab

**URL:** <https://forum.katalon.com/t/get-url-return-url-on-new-tab/65771>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [June 8, 2022, 7:16am UTC](https://forum.katalon.com/t/get-url-return-url-on-new-tab/65771 "2022-06-08T07:16:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aldia](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/aldia/32/16104_2.png) [@aldia](https://forum.katalon.com/u/aldia)\
**Post date:** [June 8, 2022, 7:16am UTC](https://forum.katalon.com/t/get-url-return-url-on-new-tab/65771/1 "2022-06-08T07:16:05Z")

</div>

Hi, I want to ask, when using getUrl function it’s always return the URL of the first tab, instead I want it to return the URL of the second tab, is there a better way to getUrl of the second tab? here is the screenshot of my test

![image](https://europe1.discourse-cdn.com/katalon/original/3X/d/9/d992d4183618c066f95b4df214e6f147e6a386d2.png)

---

<div class="post-metadata">

**Author:** ![kenzie.rigole](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kenzie.rigole/32/22830_2.png) [@kenzie.rigole](https://forum.katalon.com/u/kenzie.rigole)\
**Post date:** [June 8, 2022, 7:36am UTC](https://forum.katalon.com/t/get-url-return-url-on-new-tab/65771/2 "2022-06-08T07:36:16Z")

</div>

under the assumption that step 9, clicking the ‘view linkedin profile’ button, opens a new tab, then you will first need to switch to the new tab before getUrl will return the url for that tab  
see [https://docs.katalon.com/docs/katalon-studio-enterprise/keywords/web-ui-keywords/webui-switch-to-window-index](https://docs.katalon.com/docs/katalon-studio-enterprise/keywords/web-ui-keywords/webui-switch-to-window-index)

---

<div class="post-metadata">

**Author:** ![aldia](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/aldia/32/16104_2.png) [@aldia](https://forum.katalon.com/u/aldia)\
**Post date:** [June 8, 2022, 7:51am UTC](https://forum.katalon.com/t/get-url-return-url-on-new-tab/65771/3 "2022-06-08T07:51:54Z")

</div>

wow thanks it’s worked 🙂

---

<div class="post-metadata">

**Author:** ![vu.tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/vu.tran/32/20584_2.png) [@vu.tran](https://forum.katalon.com/u/vu.tran)\
**Post date:** [June 8, 2022, 7:54am UTC](https://forum.katalon.com/t/get-url-return-url-on-new-tab/65771/4 "2022-06-08T07:54:00Z")

</div>

Thank you so much for your quick support. Love the way you guys support each other!
