From f44623f0ed0e96b9876213fac926cb87cad51280 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 9 Jul 2015 13:35:07 +1000 Subject: [PATCH] Fix start-up delay when creating nil singleton. --- uiautomation-ext.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uiautomation-ext.js b/uiautomation-ext.js index d042332..b9f2342 100755 --- a/uiautomation-ext.js +++ b/uiautomation-ext.js @@ -2,7 +2,9 @@ #import "lang-ext.js"; //We cannot instantiate a UIAElementNil and still get our extensions, so we hold onto one. -UIAElementNilSingleton = UIATarget.localTarget().frontMostApp().mainWindow().staticTexts().firstWithName("notFoundx123hfhfhfhfhfhed"); +UIATarget.localTarget().pushTimeout(1); +UIAElementNilSingleton = UIATarget.localTarget().frontMostApp().mainWindow().staticTexts().firstWithName("notFoundx123hfhfhfhfhfhed"); +UIATarget.localTarget().popTimeout(); extend(UIATableView.prototype, { /**