Micro Focus QTP (UFT) Forums

Full Version: how to capture the current page URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
Use regular expressions & check it out ....
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.
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")
Try this:

Code:
MsgBox Browser("micclass:=Browser").GetROProperty("url")
If you have a single, try using Browser("name:=.*").GetROProperty("url")
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.
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.
@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.
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.