Forum Discussion

nish_b's avatar
nish_b
Contributor
5 years ago

Unable to click or hover mouse on a Span element

Issue: Using .Click() or .HoverMouse() is not working for 1 of the webelements of the type [HTMLSpanElement]. Error thrown is: TypeError: webObj.HoverMouse is not a function OR TypeError: webObj.Clic...
  • BenoitB's avatar
    BenoitB
    5 years ago

    Perhaps the Panel menu is an object drawn directly on screen (onscreen object).

    To check that use the object from point method.

    To click on this kind of object you can use my method with a call like clickInObject("screen", x,y).

     

  • AlexKaras's avatar
    5 years ago

    Hi,

     

    Error thrown is: TypeError: webObj.HoverMouse is not a function OR TypeError: webObj.Click() is not a function

    This is a clear indication that webObj is not a wrapping object provided by TestComplete (as a result of FindXXX() call or using the Aliases). Most probably, webObj was obtained as a result of search by XPath and is a native DOM object.

    HoverMouse() and Click() are methods provided by TestComplete and cannot be used for native DOM objects.

    .click() (note small 'c') is a native method provided by DOM, so webObj.click() should work. I believe that something like webObj.hover() should exist in DOM as well.