Micro Focus QTP (UFT) Forums
how to capture the current page URL - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: how to capture the current page URL (/Thread-how-to-capture-the-current-page-URL)



how to capture the current page URL - sidartha - 05-15-2008

Hi,
do anybody know how to capture the current page URL?
I tried this:
Code:
Browser("Browser").Page(Browser("Browser").GetROProperty("title")).GetROProperty("URL")


I use this statement in a reusable action.
It works in one scenario but not in others.

I think it is because of the page name. Can anybody help me?

Thank you for your help!


RE: how to capture the current page URL - sreekanth chilam - 05-18-2008

Use regular expressions & check it out ....


RE: how to capture the current page URL - sidartha - 05-20-2008

Hi Sreekanth,
i went through the tutorial to understand what is regular expressions. I'm couldn't understand why/how should i use the regular expressions to capture the URL of the page.
Can you give me more details on it please?
Tahnk you in advance.


RE: how to capture the current page URL - blavanya - 05-26-2008

But i couldnt find any object name for weblist in ur code.
try to capture the area where u enter URL , then use getropropertty for that weblist

Code:
browser("hhh").page("lll").weblist("ddd").GetROProperty("value")



RE: how to capture the current page URL - Anshoo Arora - 06-03-2008

Try this:

Code:
MsgBox Browser("micclass:=Browser").GetROProperty("url")



RE: how to capture the current page URL - niranjan - 06-04-2008

If you have a single, try using Browser("name:=.*").GetROProperty("url")


RE: how to capture the current page URL - NevadaMike - 01-20-2011

Why do people reply like this and then disappear? He obviously needed more details...why not just provide them since you're going to the trouble to reply anyway? Then the problem gets solved more easily AND others can use the info as well.


RE: how to capture the current page URL - cdesserich - 01-20-2011

Easy Mike. Not only is that thread is really old, but there were solutions presented, and the original poster disappeared as well. He didn't ask for more clarification leading me to believe that one of the proposed solutions worked. No big deal.


RE: how to capture the current page URL - sreekanth chilam - 01-21-2011

@HI All,

Ohh!, It seems by mistake I might have posted the above solution for the post which I was not intended to.
Apolozies Smile
And moreover today I am seeing this!!.

@Hi Mike:
Moreover I haven't disappeared buddy and I dont have to....You can see "JOINED:Mar 2008" beside my name....
this is almost 3rd year for me being a forum member.

If you still have any issues...let me know.



RE: how to capture the current page URL - Brian.Osborne - 01-26-2011

I'm new and browsing the forums for ideas.. why wouldn't you just use and output checkpoint? I'm not offering suggestions, just wondering if there is a better way.