From 900d110d1564848a9593a3f73ceaad613e17954e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Mon, 18 Jan 2016 20:49:54 +0100 Subject: [PATCH] Try to replace the sleep by WaitUntil ... --- test/Sauce.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/Sauce.php b/test/Sauce.php index d9ea154..923b344 100644 --- a/test/Sauce.php +++ b/test/Sauce.php @@ -201,9 +201,15 @@ class Cops extends Sauce\Sausage\WebDriverTestCase // Click on the cog to show the search $cog = $this->byId ("searchImage"); $cog->click (); - sleep (1); + //sleep (1); // Focus the input and type + $this->waitUntil(function () { + if ($this->byName ("query")) { + return true; + } + return null; + }, 1000); $queryInput = $this->byName ("query"); $queryInput->click (); $queryInput->value ($src);