i am trying to capture the URL from the open browser and
store it. pls give me solution how we can do this in QTP.

thanks

Answers were Sorted based on User's Feedback



i am trying to capture the URL from the open browser and store it. pls give me solution how we can ..

Answer / chandu

try this

x=Browser("ALL Interview .com ::").GetROProperty("openurl")

msgbox x

Is This Answer Correct ?    4 Yes 0 No

i am trying to capture the URL from the open browser and store it. pls give me solution how we can ..

Answer / neeraj chauhan

Hi All


Set oDesc=Description.create()
oDesc("html tag").value="INPUT"
oDesc("micclass").value="Link"

set
CollectionOfLinks=Browser("vBrowser").page("vPage").childobjects(oDesc)
NumberOfLinks=CollectionOfLinks.count()

for i=0 to NumberOfLinks
Print CollectionOfLinks(i).GetRoProperty("href or url")
Next

If still you face any problem, reply me.


Thanks and Regards
Neeraj Chauhan

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More QTP Interview Questions

how to export the result to notepad....for example i want to enter the user name and pass word and clicking on login button ......once you click on login button the corresponding page will open ...in that page you having one list box ...here you can get either success or failure ........friends here i want export the message what ever i got either success or failure .....how to export the result to note pad

1 Answers   Mind Tree,


How does QTP identifies the object in the application Mainly objectives are three type's OF PROPERTIES namely

3 Answers  


in my database haveing 3X3 (manas having 3 rows 3 colums) i want to test only (2nd row 3colum) bit how to test either script or any automation plz explain? (Chandana)

8 Answers   IBM,


How can the name of a checkpoint be changed in Qtp

2 Answers   Ordain Solutions,


VM1 = "Invalid username or password. Please try again. " VM2 = "Email id is required.Password is required. " VM3 = "Email id is an invalid e-mail address.Password is required. " VM4 = "Password is required. " VM5 = "Email id is required. " VM6 = "Email id is an invalid e-mail address. " 'Rowcount of the Local sheet Rowcount = DataTable.GetSheet("Invalid login transactions").GetRowCount 'Valid emailid and Password Emailid = "test@iteamic.com" Password = "Password0" 'For i = 1 to Rowcount 'Parameterised Email_id Browser("Browser").Page ("Page").WebEdit("emailAddress").Set DataTable("Email_id", dtLocalSheet) EID = Browser("Browser").Page ("Page").WebEdit("emailAddress").GetRoProperty("value") 'Parameterised Password Browser("Browser").Page ("Page").WebEdit("password").Set DataTable("Password", dtLocalSheet) PWD = Browser("Browser").Page ("Page").WebEdit("password").GetROProperty("Value") If EID = Emailid And PWD = Password Then Reporter.ReportEvent micPass, "EID & PWD check", "Email id and Password is correct, One iteration of Invalid login attempts is not being executed" Else Browser("Browser").Page("Page").WebButton ("Sign-In").Click 'Output value exported to the local sheet Browser("Browser").Page ("Page_2").Output CheckPoint("Home page_Sign in") 'Storing the output value in a variable(OUTPUT OUTPUT = Datatable.GetSheet ("Invalid login transactions").Getparameter ("Validation_message_signin").value 'comparing the Variable Output and the Validation message for a given input If OUTPUT = VM1 Then Reporter.ReportEvent micPass, "VM1", "Invalid username or password. Please try again. " else if OUTPUT = VM2 Then Reporter.ReportEvent micPass, "VM2", "Email id is required.Password is required. " else if OUTPUT = VM3 Then Reporter.ReportEvent micPass, "VM3", "Email id is an invalid e-mail address.Password is required. " else if OUTPUT = VM4 Then Reporter.ReportEvent micPass, "VM4", "Password is required. " else if OUTPUT = VM5 Then Reporter.ReportEvent micPass, "VM5", "Email id is required. " else if OUTPUT = VM6 Then Reporter.ReportEvent micPass, "VM6", "Email id is an invalid e-mail address. " else Reporter.ReportEvent micFail, "EID & PWD check_FAIL", "Validation message checkpoint failed. The captured v msg is not required" End if End if I am getting syntax error saying "Expected 'End If'" at the last line, Why is this? Kindly explain...

1 Answers  






We stored into the objects OR and then write the scripting

0 Answers   L&T, Wipro,


Hi... Can anybody help me to write the vbscript for this question..!!! Am having a string "HELLO WORLD", i want to find how many "L"s are there.....????? --> HANEEF <--

5 Answers  


plz tel me what is the differnce between QC & QTP?

3 Answers   iGate, Satyam,


How can you capture(Read) the values from a Table?

1 Answers  


Can Any One Write How to Write the Script for Child Objects

4 Answers  


How do you do batch testing in QTP, if so explain?

2 Answers  


hi, In A Table there are some columns and dynamic rows and in each row in first column there is a link with name. upon clicking on that link it will show some details. write the vbscript to check that link without descriptive programming?

2 Answers   HealthAsyst,


Categories