Forum Discussion

olga_ulchina's avatar
olga_ulchina
Occasional Contributor
10 years ago

Event bound to a button or link not executed on click

I am testing a website in IE10 using vbscript. I mapped a link on a page and I want to click on this link (after clicking I expect an alert). When running my script I can see in TestComplete lo...
  • AlexKaras's avatar
    10 years ago
    Hi Olga,



    What if you try to emulate the click? Something like this (untested pseudo-code):

    Set lnk = ...

    Call lnk.ScrollIntoView(False)

    lnk.HoverMouse

    Call aqUtils.Delay(500)

    Call LLPlayer.MouseDown(Win32API.VK_LBUTTON, _

        lnk.ScreenLeft + 5, lnk.ScreenTop + 1, 500)

    Call LLPlayer.MouseUp(Win32API.VK_LBUTTON, _

        lnk.ScreenLeft + 5, lnk.ScreenTop + 1, 500)



    Does it help?