Browse Source

scroll the upload button into view

Girish Ramakrishnan 7 năm trước cách đây
mục cha
commit
54bbdce78a
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      test/test.js

+ 3 - 0
test/test.js

@@ -146,6 +146,9 @@ describe('Application life cycle test', function () {
             return browser.findElement(by.xpath('//a[text()="Change Picture"]')).click();
         }).then(function () {
             return browser.sleep(10000);
+        }).then(function () {
+            var button = browser.findElement(by.xpath('//button[@data-action="upload"]'));
+            return browser.executeScript('arguments[0].scrollIntoView(false)', button);
         }).then(function () {
             return browser.findElement(by.xpath('//button[@data-action="upload"]')).click();
         }).then(function () {