Fix refresh test to wait so it doesn't fail when it runs to fast.
diff --git a/test/src/navigation_test.dart b/test/src/navigation_test.dart
index 2221977..b0ec418 100644
--- a/test/src/navigation_test.dart
+++ b/test/src/navigation_test.dart
@@ -26,10 +26,14 @@
test('refresh', () async {
var element = await driver.findElement(new By.name('q'));
await driver.navigate.refresh();
- try {
- await element.name;
- throw 'Expected SERE';
- } on StaleElementReferenceException {}
+ await waitFor(() async {
+ try {
+ await element.name;
+ } on StaleElementReferenceException {
+ return true;
+ }
+ return 'expected StaleElementReferenceException';
+ });
});
});
}
diff --git a/test/src/window_test.dart b/test/src/window_test.dart
index 6d5fdf0..b9acda4 100644
--- a/test/src/window_test.dart
+++ b/test/src/window_test.dart
@@ -29,7 +29,7 @@
});
// May not work on some OS/browser combinations (notably Mac OS X).
- solo_test('maximize', () async {
+ test('maximize', () async {
var window = await driver.window;
await window.setSize(const Size(200, 300));
await window.setLocation(const Point(100, 200));