Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

Invalid Callee in Firefox

$
0
0

TC10 does not add empty span objects to the object browser, which means you can't add them to your NameMapping file.  I am using the code below to click one of these empty span objects in order to work around this 'feature'.  The code works fine in IE 11 and Chrome, but returns a VBScript runtime error when used in Firefox.

 

VBScript runtime error:  Invalid callee

Any ideas on a work-around?  Google isn't turning up anything useful.

 

Field = "Aliases.App.SendEmailForm.EmailIconBar"
Value = "Send Email" 

Set objField = Eval(Field)
    
    For i = 0 to objField.childElementCount - 1
        Set ChildItem = objField.children.item(i)'Firefox - Runtime error: Invalid Callee
        If ChildItem.nodeName = "SPAN" Then
            If ChildItem.Title = Value Then'# ChildItem.Click only works in IE.  The Click method doesn't exist for this object in Chrome or FF
                'ChildItem.Click
                '# Rect works for IE and Chrome.
                Set Rect = ChildItem.getBoundingClientRect()
                x = Rect.right - Rect.left + 1
                y = Rect.bottom - Rect.top + 1
                Call objField.Click(x, y)
                fClickEmptySpan = 1
                Exit Function
            End If
        End If
    Next


This recent topic covers the same kind of issue, but it didn't look like Firefox was being tested:  http://community.smartbear.com/t5/Functional-Web-Testing/Click-method-not-accepted-in-chrome/m-p/100484#U100484

 


Viewing all articles
Browse latest Browse all 20755

Trending Articles