Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run multiple urls in QTP.
#1
Not Solved
Hi,

Could you please help me how to run 2 or 3 urls in QTP one after another automatically? let me be more specific, suppose if I want to run google and yahoo pages one after another using QTP, what methods should I use .Please help me with this problem.

Thanks
Manju
Reply
#2
Not Solved
Manju,

I guess if u go for Record and Play there u can give only one ur address.But for ur question i can give the solution in DP...Following is the code of DP which opens google url first and then closes that,then it opens yahoo url and closes

Code:
Dim br,url1,url2

br = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
url1 = "www.google.com"
url2= "www.yahoo.com"

systemutil.Run br,url1,"","",3

Browser("name:=Google").Close

systemutil.Run br,url2,"","",3

Browser("name:=Yahoo!").Close

Regards
Raj
Reply
#3
Not Solved
Hi Raj,

Thank you very much. I don't know programming. Could you please help me where to type the script.

Thanks
Manju
Reply
#4
Not Solved
Hi Raj,

I copied the same script in expert view. But I am not able to see either yahoo or google page in active Screen.I have a situation at my work place to run and record 34 different urls in one test. Every day I got run them and see whether all the page check point works. could you please help me with this. It is very urgent.

Thanks
Manju
Reply
#5
Not Solved
Hye Manju,
In Descriptive Programming (DP) we will not use the Object Repository to save the properties of an object, we will use the properties of an object in the statememt only.so u wont get the yahoo or google page in active Screen,

To ur second questing,to check 34 urls in my knowledge u have two methods.
1) u have to develop 34 test script each one for one url and run in this case u can give one url in "Record and Run Setting" window.Here you can see the yahoo or google page in active Screen.

2) U have to go for DP if u dont want to develop 34 scripts.in DP u can use all ur urls and run, but active Screen will not show any pages

let me ur feed back

Regards
Raj
rhotur@gmail.com
Reply
#6
Not Solved
Hi Raj,

Tell me how to introduce Page check points for different Urls using DP.So that I can adopt same concept for all my 34 urls.

Thanks
Manju
Reply
#7
Not Solved
Hi Raj,

I tried running your script and it's running good, i have a small issue.

1) systemutil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","www.google.com","","",3

2) systemutil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","www.google.com"

what is the difference between the above 1st and 2nd step. both the steps are running properly.
what is the difference and which one is correct.


Thanks,
Rajesh
Reply
#8
Not Solved
Hi Rajesh,

Ur right,

both r correct code, only difference is that i have wtitten as per the syntax and "3" is the mode which maximizes the broweser,if u want to put the browser in minimized position then u can replace the "3" to "1" and if want to open the browsewr in "restore" position then u can pur "2" instead of "3"

I guess it clears ur question.

Regards
Raj
Reply
#9
Not Solved
Hi Raj,

Now I am clear, Thanks for clearing the issue.


Thanks,
Rajesh
Reply
#10
Not Solved
Hi,
i am trying to capture the URL from the open browser and store it. pls give me solution how can we do this in QTP.

thanks
sachin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Import multiple values from excel into QTP Shaik Ahmed 2 3,260 03-09-2014, 09:17 PM
Last Post: Shaik Ahmed
  Installing QTP -Freeware on Multiple Machine sangi 1 2,638 06-11-2013, 06:13 PM
Last Post: Ankur
  How to run same script for different URLs when loading time is different mansis 5 4,492 09-21-2012, 12:42 PM
Last Post: mansis
  How to use same script for multiple URLs mansis 29 20,247 09-01-2012, 05:12 PM
Last Post: mansis
  Switching between URLs sqadri 1 2,577 02-01-2012, 07:36 AM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)