• Home  / 
  • QTP/UFT
  •  /  QTP 11 – Difference in behavior when working against IE vs. Firefox

QTP 11 – Difference in behavior when working against IE vs. Firefox

IE vs. Firefox

If you’ve done any type of web development for browsers in the past, I’m sure I don’t have to tell you how frustrating the differences between browser types can be. Unfortunately, having to automate different browser types is no exception.

With the release of patch QTPWEB_00090, QTPWEB_00092 , and QTPWEB_00100, QuickTest Professional now supports testing web applications in Firefox browsers. There are differences, however, in the ways in which QTP interacts with the two browsers that you should be aware of.

WebButton Differences

When recording against IE on a WebButton, the default “Type” property value is Button. Against Firefox, however, the default value is Submit. To avoid issues, be sure not to use the Type property in your object repository or programmatic description to identify a webbutton test object.

DOM Differences

The Document Object Model (DOM) used for Internet Explorer is different than the one used by FireFox. That means that if you’re writing scripts that need to interact directly with DOM statements, you have to bake in logic to handle both. To find out more, check out:

Dialog Boxes

That’s right – and how annoying is this? – but IE and Firefox use different dialogs. For example, Firefox 3.x and below will show a security dialog with a different format than IE:


What’s even crazier is that the newer versions of Firefox’s dialogs are also different from older versions of Firefox. Luckily for new Firefox releases, however, QTP has two new Firefox dialog-related methods: HandleDialog and GetDialogText.

HandleDialog and GetDialogText

Both methods can be accessed from the Browser object and enable you to perform actions against browser dialog boxes that were opened from HTML content:

  • HandleDialog – This method clicks a button on a browser dialog box such as an alert, confirmation or prompt:
    • Browser(“Browser”).HandleDialog micOK
  • GetDialogText – This method retrieves the text displayed in a browser dialog box:
    • browserText = Browser(“Browser”).GetDialogText

(These methods only work with Mozilla FireFox 4 or higher, and you’ll need to have the latest FireFox patches installed.)

Recovery scenarios

Because of the difference in standard dialog boxes described above, if you’re using pop-up recovery scenarios that use the Click button against Dialogs, you’re basically screwed. Recovery operations that were built for Microsoft Internet Explorer will not work for Firefox!

Firefox menus and sidebars

QuickTest Pro does not support Firefox menus or sidebars. The only toolbar buttons it supports are the following:

  • Home
  • Refresh
  • Back
  • Forward
  • Stop

Known QTP 10 FireFox limitations

QTP 10’s recording feature is not supported against Firefox.

The Object property is not supported in QTP 10 and older versions.

As far as possible problems with QTP or Firefox go, the preceding are all that come to mind at present.

If you know of or experience any other issues, please let me know!


 

16 comments
Click here to add a comment