Solved

QTP script to get domain

Posted on 2006-07-23
9
503 Views
Last Modified: 2008-02-01
I need a QTP script to get domain of a page i.e. get the URL and then extract the domain from the URL.
0
Comment
Question by:noam_dz
  • 4
  • 4
9 Comments
 
LVL 8

Expert Comment

by:hiteshgupta1
ID: 17200225
see if this helps

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

Thanks
Hitesh
0
 
LVL 8

Expert Comment

by:hiteshgupta1
ID: 17200228
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
0
 
LVL 4

Author Comment

by:noam_dz
ID: 17200253
I'm letting you know.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 4

Author Comment

by:noam_dz
ID: 17200260
Shouldn't it be RO instead of TO in Get__Property  
0
 
LVL 8

Expert Comment

by:hiteshgupta1
ID: 17213155
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
0
 
LVL 4

Author Comment

by:noam_dz
ID: 17213441
DID YOU RECORD IT ON ONE PAGE AND TEST IN ON ANOTHER?

Anyway, how do I extract the domain name ?
0
 
LVL 4

Author Comment

by:noam_dz
ID: 17213683
0
 
LVL 8

Accepted Solution

by:
hiteshgupta1 earned 500 total points
ID: 17213957
Hi Noam

For Extracting Domain name u need to perform string manipulation operation on the URL fetched
That's it

n yeah i haven't tried it on other pages
will try it and let u know the consequences

Thanks
Hitesh
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
drawing animated level bar based on numbers 3 97
c++ reading data from file into two dimensional array 3 109
simplest php form 3 79
Beginner to Unreal Engine 4 5 80
This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question