Try to replace the sleep by WaitUntil ...

This commit is contained in:
Sébastien Lucas 2016-01-18 20:49:54 +01:00
父節點 70bf01617c
當前提交 900d110d15
共有 1 個檔案被更改,包括 7 行新增1 行删除

查看文件

@ -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);