Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HoW to write script for launching IE?
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Ankur,


I Want to open Internet Explorer and then want to navigate google.com with the help of descriptive programming in QTP 9.2.
I am giving the descriptions in the form of string arguments.

Just check this script:

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe"
    Browser("Class Name:=Browser","title:=about:blank").Page("Class Name:=Page","width:=1440").Sync
    Browser("Class Name:=Browser","title:=about:blank").Navigate "google.com"

I am getting General Run Error. I used Msgbox.Errnumber after the script to know the error number but i was not able to solve the problem with the help of that error number.
Please help me out.!!!

Thanks and Regards
Bhawin Joshi
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Bhawin,

Try the code below

Code:
SystemUtil.Run "iexplore","www.google.com"
Reply
#3
Solved: 11 Years, 4 Months, 4 Weeks ago
Thanks Prabhat

Its Working..!!!!Big Grin
Reply
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
This script is not working.
Reply
#5
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Suresh
Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe"
Browser("title:=about:blank").Page("Class Name:=Page","width:=1440").Sync
Browser("title:=about:blank").Navigate "google.com"

Will work, and one more thing is , as u are specifying the width:=1440 here which is virual property...this will not wok 100/100 times.
Reply
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
U can use script given by prashanth...

Its working fine and fabulous..!!!Big Grin
Hi kavitha,
can u tell me which properties we need to specify and which i cant specify..

like width is a virtual property ...what are other virtual properties...
Reply
#7
Solved: 11 Years, 4 Months, 4 Weeks ago
width,height,x and y coordinates....which are dependent on window size and location.
I had not seen the last replies that u got it working...i just tried the same code to work, to know what was the problem.
Reply
#8
Solved: 11 Years, 4 Months, 4 Weeks ago
OK thanks a lot..!!!! Kavita

Smile
Reply
#9
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi two ways of launching Google in IE is:
1.
Code:
SystemUtil.Run "http://www.google.co.in/"

2.
Code:
Set oIE=CreateObject("InternetExplorer.Application")
oIE.Visible=True
oIE.Navigate "http://www.google.co.in/"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT 12.02 Launching default home page sureshbl 0 3,324 06-01-2015, 02:15 AM
Last Post: sureshbl
  How to write a script for fly out menus (Parent - Child - Sub Child) rajkumarsm 3 4,775 09-02-2014, 10:01 AM
Last Post: vinod123
  Launching .exe file with parameters magnifyingone 1 3,218 08-28-2014, 06:39 PM
Last Post: dplank
  How to read and write in excel through QTP script shwetha_m 5 29,778 03-14-2014, 02:58 PM
Last Post: venkatesh9032
  Getting Application Error while launching Outlook yogesh kancherla 3 3,312 10-29-2012, 12:17 PM
Last Post: krr

Forum Jump:


Users browsing this thread: 6 Guest(s)