Forum Discussion

rushikesh's avatar
rushikesh
Contributor
7 years ago
Solved

How to control time taken to check if an object Exist or no when using the method Exists

Hi,   I am using below code to check if dialog present in application is still available or no after clicking on OK button.   page2_5AxisEndConditions.Tick.Click(); if (page2_5AxisEndConditions....
  • baxatob's avatar
    baxatob
    7 years ago

    You can implement some checkObjectExists() method:

     

     

     

    function checkObjectExists(object, timeout) {
    
      Options.Run.Timeout = timeout;
      if object.Exists {
        do_something();
      }
      else { 
        do_something_else();
      }
      Options.Run.Timeout = 10000;
    
    }