Link to home
Start Free TrialLog in
Avatar of noam_dz
noam_dz

asked on

QTP script to get domain

I need a QTP script to get domain of a page i.e. get the URL and then extract the domain from the URL.
Avatar of hiteshgupta1
hiteshgupta1

see if this helps

 Browser("YOUR_BROWSER").Page("UR_PAGE").GetTOProperty ("url")

Thanks
Hitesh
this will just give u the URL of the web page
if u haev any problem in extracting domain name then kindly let me know

Thanks
Hitesh
Avatar of noam_dz

ASKER

I'm letting you know.
Avatar of noam_dz

ASKER

Shouldn't it be RO instead of TO in Get__Property  
hi noam,
Sorry for being late in reply!

it is "GetTOProperty ("url")"
I have tested it here and it displays the URL correctly

Thanks
Hitesh
Avatar of noam_dz

ASKER

DID YOU RECORD IT ON ONE PAGE AND TEST IN ON ANOTHER?

Anyway, how do I extract the domain name ?
ASKER CERTIFIED SOLUTION
Avatar of hiteshgupta1
hiteshgupta1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial