Forum Discussion

vidyamohan's avatar
vidyamohan
New Member
11 years ago

Click item is not available

I have a toolbar which has 4 items one of the item is new button,i want to click on this new button to open the new model dialogue

but there is no click item available in the methods so I did "PerformActivate " on this item after executing this the new button is clicked it opens a new window also but it is stuck there it will not move from that point even after waiting for so long.

can anybody suggest how do I handle this ..

3 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    Also try recoding actions you need 

    Some times click method may exist inside of child object (way it's written)

     

  • PerformActivate sounds like the SandBar toolbar control - could you please clarify if that's the case? TestComplete doesn't provide the ClickItem method for SandBar toolbars, but feel free to submit a feature request.

    As for the locking - try calling PerformActivate asynchronously. The window opened by the New button is probably a modal window, and it prevents PerformActivate from returning a value until the user closes the window - hence the locking. Asynchronous method call should help avoid the locking:

     

    // JScript
    var oResult = Runner.CallObjectMethodAsync(obj, "PerformActivate");
    
    // Do things in the window, then close this window
    ...
    
    // Wait for the PerformActivate method to return control to the test
    while (! oResult.Completed)
      aqUtils.Delay(100);

     

  • Manfred_F's avatar
    Manfred_F
    Regular Contributor

    just have a look onto the object browser, whether "ClickButton" (or what else) is supported by Your control..