title: White Automation-
body: <p>Having trouble having White open up a program and automate it to button click</p>
  
  <pre><code>{
          Application manager = Application.Launc(@"C:\\");
          Window mainWindow = manager.GetWindow("");
  
          Simulation(mainWindow);
          ZepSelect(mainWindow);
  
          manager.Kill();
  
      }
      //simulation mode
      private static void Simulation(Window mainWindow)
      {
          Window Sim = mainWindow.ModalWindow("");
          var searchCriteria = SearchCriteria.ByText("");
          var button = Sim.Get&lt;Button&gt;(searchCriteria);
          button.Click();
      }
  //end simulation 
      private static void ZephyrSelect(Window mainWindow)
      {
          Window ZephOp = mainWindow.ModalWindow("");
          var searchCriteria1 = SearchCriteria.ByText("");
          var Zeph = ZephOp.Get&lt;TreeNode&gt;(searchCriteria1);
          Zephyr.Click();
  
          var searchCriteria2 = SearchCriteria.ByText("");
          var button = ZephOp.Get&lt;Button&gt;(searchCriteria2);
          button.Click();
      }
  </code></pre>
  
  <p>It runs but then I get the error when it reaches var button = Sim.Get(searchCriteria);  that object not set to an instance of an object. I'm observing that Sim is null. Any mistakes anyone can see that I'm making.</p>