소스 검색

scroll button into view

Girish Ramakrishnan 7 년 전
부모
커밋
58dd330de4
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      test/test.js

+ 3 - 0
test/test.js

@@ -129,6 +129,9 @@ describe('Application life cycle test', function () {
     function uploadImage(done) {
         browser.get('https://' + app.fqdn + '/user/admin/edit').then(function () {
             return browser.wait(until.elementLocated(by.xpath('//a[text()="Change Picture"]')), TEST_TIMEOUT);
+        }).then(function () {
+            var button = browser.findElement(by.xpath('//a[text()="Change Picture"]'));
+            return browser.executeScript('arguments[0].scrollIntoView(true)', button);
         }).then(function () {
             return browser.findElement(by.xpath('//a[text()="Change Picture"]')).click();
         }).then(function () {