Unified Functional Testing Practitioners Forum

UFT is not working properly with web objects on Firefox...

Acclaimed Contributor

UFT is not working properly with web objects on Firefox...

First of all, let's take a look on the version of the programs:


UFT: 11.53 build 0382 (Installed the UFT_000444)

Internet Explorer: 10.0.9200.16750

Firefox: 24.2.0


The problem: On IE we don't have any issue when we are working with web objects recognition and operation. On Firefox, we can recoginze the objects and operate until certain point.


Follow a script sample and the description of the problem.


'Before run this script, open the browser on this url: http://www.w3schools.com/html/html_tables.asp

Call TestBrowser(1,"Right")


Sub TestBrowser(ColumnIndex,ExpectedAlignement)
Dim x

Dim strTextResult, strAlignment

Dim theTableObject, theCellRow
Dim theCell
Dim theCellStyle

strTextResult = ""

'Captured the object via XPath in order to make the execution independent of the browser

Set objTable = Browser("Title:=.*").Page("Title:=.*").WebTable("xpath:=//h2[text()='HTML Table Example:']/../table[@cellpadding=3]")


If not objTable.Exist(0) Then
msgbox "Object doesn't exist."

intRowsNumber = objTable.RowCount

For x=0 To intRowsNumber -1

Set theTableObject=objTable.Object

'On Firefox the following error occurs on this line below: TypeError: obj[GetCaseInsensitiveName(...)].apply is not a function
Set theCellRow=theTableObject.rows(x)

Set theCell=theCellRow.Cells(ColumnIndex)
Set theCellStyle = theCell.currentStyle

strAlignment = theCellStyle.textAlign ''Get the align property of every cell

If UCASE(strAlignment) <> UCASE(strAlign)Then
strTextResult = strTextResult & "Row: " & x & ". Column: " & ColumnIndex & ". Expected: " & ExpectedAlignement & ". Found: " & strAlignment & ". " & vbcrlf
End If


If strTextResult<>"" Then
msgbox strTextResult
End If
End If
End Sub



So, basically, the Object method is not working on Firefox. I would like to know if anybody has an alternative to this in order to get the same script working on both browsers.


Thank you very much in advance!

//Add this to "OnDomLoad" event