Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit f91eb0e

Browse files
committedJul 27, 2015
test(expression): add sleep(100) to protractor spec that uses alert
In Chrome, if two alert boxes pop up, without enough time between them, Protractor (or possibly ChromeDriver) sometimes fails to recognize the second alert.
1 parent 861636c commit f91eb0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎docs/content/guide/expression.ngdoc

+3
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ provide mockable access to globals.
141141
}
142142
element(by.css('[ng-click="greet()"]')).click();
143143

144+
// We need to give the browser time to display the alert
145+
browser.sleep(100);
146+
144147
var alertDialog = browser.switchTo().alert();
145148

146149
expect(alertDialog.getText()).toEqual('Hello World');

0 commit comments

Comments
 (0)