소스 검색

scroll into view

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

+ 3 - 0
test/test.js

@@ -109,6 +109,9 @@ describe('Application life cycle test', function () {
             return browser.wait(until.elementLocated(by.xpath('//ul[contains(@class, "installed")]//strong[text()="nodebb-plugin-beep"]')), TEST_TIMEOUT);
         }).then(function () {
             return browser.sleep(10000);
+        }).then(function () {
+            var button = browser.findElement(by.xpath('//li[@id="nodebb-plugin-beep"]//button[@data-action="toggleActive"]'));
+            return browser.executeScript('arguments[0].scrollIntoView(false)', button);
         }).then(function () {
             return browser.findElement(by.xpath('//li[@id="nodebb-plugin-beep"]//button[@data-action="toggleActive"]')).click(); // activate the plugin
         }).then(function () {