Forum Discussion

Oferv's avatar
Oferv
Super Contributor
15 years ago

First menu item can be clicked while the other can't

Hi,

during my script running i'm clicking menu items.the problem i experiance is that when i click File-->Open... by using this code



Aliases["DesktopMainWindow"]["Source_MainWindow"]["MainWindow"]["LayoutRoot"]["menu"]["WPFMenu"]["Click"]("File|Open...");



the menu item is clicked but, when i'm trying to click the following



Aliases["DesktopMainWindow"]["Source_MainWindow"]["MainWindow"]["LayoutRoot"]["menu"]["WPFMenu"]["Click"]("File|Close");



the click doesn't perform.



any ideas?



Thanks

15 Replies

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Ofer,


    I failed to reproduce the behavior you had described. So, if the cause of this behavior is really important for you, I recommend that you contact our Support Team and send them:

    1. Your TestComplete project.

    2. Your tested application that they could use to reproduce the behavior.


    Thanks.

  • Oferv's avatar
    Oferv
    Super Contributor
    Sure Irina i'll do that.

    we already signed a NDA contract so it shouldn't be a problem

    Thanks
  • Oferv's avatar
    Oferv
    Super Contributor
    Hi,



    After a little bit more investigating the problem i found out what is causing the 



    Aliases["DesktopMainWindow"]["Source_MainWindow"]["MainWindow"]["LayoutRoot"]["menu"]["WPFMenu"]["Click"]("File|Close");



    not to perform.



    it's the line codes that are located in the unit load the application and it's making sure the application exists before moving on:



    if(!Aliases["DesktopMainWindow"]["Source_MainWindow"]["MainWindow"]["LayoutRoot"]["DesktopGrid"]["RingBinder"]["MainViewportParent"]["MainViewport"]["WaitProperty"]("Exists",true,600000))


      {


     
    Log["Warning"]("failed to load,Abort
    iteration")


      Exit["Exit"]()


      }



    if this lines is being removed the close operation is being perform properly.



    any idea why those lines can prevent the close operation from being preform?



    Thanks

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Ofer,


    I've consulted our developers, and they told me that it's difficult to say anything for sure without reproducing the situation with your application. As far as I know, you have already contacted our Support Team and they've received your application. So, they are working on the solution, and I recommend that you continue working with them via e-mail.


    Thanks :)