Ver código fonte

scroll into view

Girish Ramakrishnan 7 anos atrás
pai
commit
7e4ddd4968
1 arquivos alterados com 3 adições e 0 exclusões
  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 () {