Command for launching browser

Hi, could you please throw some light on how to launch browser of different types…seeking for command to be used to launch the browser. I am trying to use “Open iexplore”, but it is not successful in launching the IE on Windows(SUT)

EggPlant doesn’t have any sort of built-in macro-like features of this sort. You have to think about the interactions EggPlant has with the remote system in terms of it sending just mouse events and key strokes. You can write parameterized scripts to combine those mouse and keyboard events into more complex actions, but there aren’t any of those complex actions built in to the system.

If you’re scripting against Windows, you could use a script something like the following to open a URL in IE:

params urlToLoad

TypeText windowsKey, "r" -- open the Run window
TypeText  "iexplore" && quote & urlToLoad & quote & return

At least one user also did this by using the shell command to ssh to the SUT and launch the browser via the command line.

I hope this helps.

Thank you, Matt, It helped me.

Used your code and am able to fire off my applications with Firefox, Chrome, and ie. Thanks a lot.

I have one simple question. I am testing Windows 7 and XP with all the above browsers. I let Eggplant click the Start -->Run images, but in Windows 7 there is now a Microsoft Icon button rather then a Start Buton. So my scripts for XP are not working with Windows 7.

I have been trying to figure out if I can store both images in a folder and let Eggplant decide which image to use rather then creating a seperate script for each operating system. Is this possible?

Yes, this is called an “image collection”. When you go to capture the “Microsoft Icon Button”, click the Start Button image in the list and click the Make Collection button at the bottom of the Save Image panel. This will create a folder called “Start Button” (or whatever your image name is) and put the original image in it. Now you can save the “Microsoft Icon Button” image into this folder and when your script goes looking for the “Start button”, it will look for each image in the folder in turn until it either finds one of them (you can have as many different images as you need) or it runs out of images to look for.