ソースを参照

Workaround random errors

     Uncaught WebDriverError: move target out of bounds: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
  (Session info: chrome=63.0.3239.84)
  (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.4.0-71-generic x86_64)
Girish Ramakrishnan 7 年 前
コミット
e506f017dd
1 ファイル変更7 行追加3 行削除
  1. 7 3
      test/test.js

+ 7 - 3
test/test.js

@@ -42,9 +42,13 @@ describe('Application life cycle test', function () {
     var email, token;
 
     function login(done) {
-        browser.manage().window().setSize(1280,768);
-        browser.manage().deleteAllCookies();
-        browser.get('https://' + app.fqdn + '/login').then(function () {
+        browser.manage().window().setSize(1280,768).then(function () {
+            browser.manage().deleteAllCookies();
+        }).then(function () {
+            return browser.get('https://' + app.fqdn + '/login');
+        }).then(function () {
+            return browser.sleep(5000);
+        }).then(function () {
             return browser.executeScript('localStorage.clear();');
         }).then(function () {
             return browser.get('https://' + app.fqdn + '/login');