Forum Discussion

dyarwood's avatar
dyarwood
Contributor
11 years ago

TestComplete won't click a tabpage

Hi,



I'm having a problem with TestComplete 10 clicking a Home tab.



This is pretty odd, the click event is within an If Object call and I've adding Logging so I can see the branch is getting executed. No errors are reported, and the Log 'shows' the click and it should be succeeding...



The NameMapping had no difficulty mapping the object and if I try to trace it thru the name map or the object browser it identifies the tabpage immediately and succeeds each time I use the right-click, Highlight on screen option.



If anyone has run into something like this before and can offer some advice it'd be appreciated.



Thanks,

David





5 Replies

  • Are you sure this tab button can react to the middle mouse button clicks?
  • What you mean by saying that ClickM is better that Click?

    Click emulates left mouse button click, and ClickM is for middle mouse button click emulation.
  • It seems you misunderstand the purpose of ClickM action - it is not to click to the middle of an object but to click the same way as when you click manually using the middle mouse button. I believe you should take a look at this article: support.smartbear.com/viewarticle/58891/

    If you want to click to the middle of the tested object you should just call Click without parameters: obj.Click()
  • Hi,



    Thanks for the post. 



    I'm fairly new to TestComplete. From your response, are you suggesting that a ClickM event may fail but a Click event will succeed with some objects? I can try switching it, but I'm really quite curious to know if ClickM is less reliable than Click? That would be a real surprise to me and something it'd be nice to know. I'm setting up my tests normally using ClickM because it seems 'better' to me than Click.



    Thanks,

    David
  • Hi,



    Thanks again.



    You asked if I was sure if the tabpage could react to a middle mouse click. I wasn't sure what you meant by 'middle mouse click' other than clicking it in the middle - which is the ClickM operation. 



    Did you mean am I sure I can click on the tab? If so, then yes, after my auto test fails it stops right at that point. Clicking the tabpage manually works fine, it's basically just a button. 



    David