Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open a URL. through QTP
#1
Question 
Hello All,

i am newbie to qtp ...

Can anyone give me a clue how to proceed on the below requirement...

when i try to run QTP...
it should prompt me a textbox(eg:- enter the URL you would like to open).
based on the text(eg:- URL name) which we enter into a text box... that particular website should open...


Thanks in advance
Navya
Reply
#2
Hi Navya,
This is the code you asked for

systemutil.Run inputbox("")

But usually we donot use like this in real environement..

This is the following code in the real environement

systemutil.Run "www.mail.yahoo.com","","",3

now what you have to do is highlight systemutil and press f1 then learn about that object.

Hope that is going to help you...

Regards
Sridhar
Reply
#3
Reply
#4
please check your syntax you have used more than one " in systemutil.run line..Hope this was the only problem..:-)
Reply
#5
this time i tried using the below format ....

Code:
sName = InputBox("Enter Url") systemutil.Run ""& sName,"","",open,3

it worked out successfully for me.

Thanks for all suggestions...

thanks
Navya
Reply
#6
Or you can use a Procedure:
Example:

Code:
StrURL = InputBox("Enter the URL") Call InvokeIE(StrURL) Function InvokeIE(URL) SET IEObj = CreateObject("InternetExplorer.Application") IEObj.Navigate URL IEObj.Visible = True SET IEObj = Nothing End Function
Reply
#7
Hi niranjan
Thanks for the another solution...
Reply
#8
Reply
#9
Instead of Browser("Browser").Close, try using Browser("name:=.*").Close
Reply
#10
Sorry I have some silly doubts about it
1) In the above script what does "name" refers to ? Is it the name of the browser... like Gmail
2) Just for closing the browser why I need to use "name:=.*"? Can you suggest some material to learn such functionalities
3) When I modified the script as you suggested I got the following error "Cannot identify the object "[ Browser ]" (of class Browser). Verify that this object's properties match an object currently displayed in your application."

Thanks,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP does not record the first step of open filight reservation application. Blossoms 9 19,402 07-20-2015, 05:50 PM
Last Post: AJAJ
  When QTP is open am not able to open my AUT. chetan3987 2 3,685 02-12-2014, 01:18 AM
Last Post: supputuri
  How to enter values into excel which is already open using QTP Narayanan 1 4,876 12-11-2013, 07:30 AM
Last Post: basanth27
  Problems with URL as Object identifier??? jcraig26 1 3,886 02-27-2013, 05:06 PM
Last Post: anil2u
  cannot open QTP tests learnasugo 8 10,479 10-18-2012, 11:28 AM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)