How to Launch Browser with eggplant?

I want to run the Application on different webbrowser. Can anyone let me know how i can run the test on multiple browser ?

How i can launch the browser with eggplant ?

I want to run the Application on different webbrowser. Can anyone let me know how i can run the test on multiple browser ?

Can you be more specific about this question? The short answer is that as long as the steps are the same, you can use the same script and use image collections to deal with elements that are visually different.

How i can launch the browser with eggplant ?

That depends on the platform that you are running against. With any SUT you can write a script that launches a browser using the same steps that a user would, such as clicking the Start menu and navigating to the browser in “All Programs”. There are some shortcuts that use the keyboard. You can easily create a script that takes the name of an application as input and uses it to open an application on the SUT. For Windows, it’s as simple as this:

params someApp

TypeText windowsKey, "r" -- opens the Run panel
TypeText someApp & return -- enters the application's name* and hits return
  • The application’s name actually needs to be the name of the executable.

For the Mac it’s a little more complicated because you need to be sure you’re in the Finder before you start:

params AppName,

TypeText F11 -- F11 to Exposé Desktop
click (100,100) -- Click Desktop to select finder
TypeText F11 -- F11 to Exposé Desktop
TypeCommand "Shift A" -- Go To Applications Folder
typetext AppName -- Type App Name
typecommand "Option O" -- Open (and close folder)

Just put either of these pieces of code in a script called something like LaunchApplication and then you can call it from any script in your suite like this:

LaunchApplication "NameOfSomeApplication"

You could also put the script into a utility suite and add it as a Helper to any other suite that you wanted to have the functionality.