Forum Discussion

katreenmei_nare's avatar
katreenmei_nare
Occasional Contributor
9 years ago
Solved

Running a Project vs. Running a Script

Hello,

 

I just have a question regarding a discrepancy when Running a Project vs. Running a Script.

Script1 contains a code like application.window1.close.clickbutton. This will simulate a click on the close button on window1. Note that window1 is being called by main menu screen (could be found behind the active window window1).

 

Running a Project

When I run the entire project, it will call Script1 and execute it right? But when it reaches the code application.window1.close.clickbutton, it will close window1 AND ALSO the main menu screen (entire application).

 

Running a Script

When I individually run the Script1, and it reaches the code application.window1.close.clickbutton, it will close window1 BUT NOT the main menu screen.

 

The expected output is the one when running a script.

Do you have any idea why? Thanks.

 

P.S. I have attached a file explaining the scenario in detail.

  • If you have set up events in other tests to be fired end of test, can be triggered after time out set up for 1 min.

    So try with timout =0 ie indefinitly.

     also try manually set screens as shown and run Project only with testItem1 (uncheck others)

     

    Other possible thing is mis-idedifying close button on main application.

    try just open main app(one at back gound ) only and run only testItem1 

    (Run the project only contains testItem1) if this close main app, thst means problem with mapping

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    If you have set up events in other tests to be fired end of test, can be triggered after time out set up for 1 min.

    So try with timout =0 ie indefinitly.

     also try manually set screens as shown and run Project only with testItem1 (uncheck others)

     

    Other possible thing is mis-idedifying close button on main application.

    try just open main app(one at back gound ) only and run only testItem1 

    (Run the project only contains testItem1) if this close main app, thst means problem with mapping

    • katreenmei_nare's avatar
      katreenmei_nare
      Occasional Contributor

      Hello NisHera,

       

      Spoiler

       "If you have set up events in other tests to be fired end of test, can be triggered after time out set up for 1 min.

      So try with timout =0 ie indefinitly."

       This solution worked!

       

      Thank you very much for your reply. Much appreciated.