Forum Discussion

m_essaid's avatar
m_essaid
Valued Contributor
10 years ago

PageControl, ClickTab() method and MsgDialog

Hi,

 

I test a Delphi application (VCL components).

 

A have, after a click on a tab on a pagecontrol, a MessageDialog that appears before the tab shows itself.

I need to close this MessageDialog to make the tab shown.

I also need to have the tab showed to click the messageDialog.

 

So TestComplete says : 

The tab control page 'mytab' was clicked, but the current page of the control did not change.

 

Anyone has a clue ?

 

Thanks in advance,

 

Mehdi

2 Replies

  • One solution that I can imagine (not very smart, but maybe it'll solve your problem) is:

     

    Click the tab that comes before the Message Dialog tab and send a Keys("^[Tab]"); (this will navigate to the next tab) to select the tab without ClickTab();

     

    That will probably make your Message Dialog show up and then you can do whatever you need to do without warnings from Test Complete.

     

    In code, something like this:

     

    //Select one tab before the one you want to work with and then...
    Window("TPageControl").Keys("^[Tab]");
    MessageDialog.OK.ClickButton();
    //Work on tab

     

    Hope that helps...!

    • m_essaid's avatar
      m_essaid
      Valued Contributor

      hi Altemann,

      I finaly fulfilled in advance the required fields to avoid this problem...