Running the same Scripts on Different Browsers

So, this is another best practice question. I can think of a few ways to do this but I’m wondering what the BEST way is before I commit a lot of time.

I have several scripts that I run from a Master on IE7. However, to get htem to run on IE6 or Firefox, I have to use different images.

What would be the best practice here?

Thanks!

I am sure Allen has some ideas and experience in this. One way for sure is to use different directories, or suites loaded using the OpenSuite() command in Eggplant. This command brings in all suite resources for that particular target/SUT. You will need either interactive, detection or data driven information to determine the SUT type and app to be tested.

One of the neat tricks/features in Eggplant v4.0 is the image collection and how it enables you to do not only version combining, but also possibly (could be kinda messy for maintenance purposes) application combining of images. I did a demo of running calculation tests against 2 totally difference apps, on totally different operating systems, and buried the logic to detect the system at a very low level, hiding all the logic so one script actually drove scripts on as many various systems as I wanted. This worked because calculators for the most part work the same. The only variation was to consider RPN or Algebraic notations. I buried that too, and it all just ‘worked’ to the top level script reader…

So, the way to best do things is the way which makes the most sense to you and your site/configuration. I would hedge a master script that will fire off messages to script objects that in return detect the OS and app being tested, and execute the right script, mapped out either in some data file or by some data source (dbase, manual input by user [not desireable, but folks do this too])…

I thought my ears were burning…sorry I missed this.

We have a suite for each OS, you could have one for each browser. We also have a script who’s sole purpose is to connect to the SUT and determine the OS, you could do something similar:

params browserName
global currentBrowser

put browserName into current browser
connect machineProperties
if imageFound(browserIcon) then click foundImageLocation()

Then you could call that from a master script:

global currentBrowser
repeat with each browser in theBrowsers
   openSuite(currentBrowser&".suite")
   run launchBrowser browser
   run test1
    .
    .
    .
    run test n

Hope this helps