javascript - Getting WebDriver to re-size using protractor and cucumber -


i have been unable resize selenium webdriver in protractor/cucumber testing.

these of commands have tried.

webdriver.webdriver.window().setsize(width, height); webdriver.webdriver.window().setsize(width, height); webdriver.webdriver.window.setsize(width, height); webdriver.webdriver.window.prototype.setsize(width, height); 

from here

browser.driver.manage().window().setsize(width, height); 

how set default browser window size in protractor/webdriverjs

and:

browser.driver.manage().window().maximize(); webdriver.webdriver.window.prototype.maximize(); webdriver.webdriver.window.maximize(); browser.driver.manage().window().maximize(); 

this article, example, no don't know imports come from.

i have had no luck understanding root of issue return promises , not sure how debug them.

i using protractor version 2.0.0

thank help!

browser.manage().window().setsize(width, height); works me. notice i'm not trying call driver in examples. full step def looks this:

this.given(/^i (?:have|change to|resize to|rotate to) (\d+)x(\d+) screen size$/, function(width, height, callback) {   browser.manage().window().setsize(parseint(width, 10), parseint(height, 10));   return callback(); }); 

you can find , other examples in cukefarm library. full disclosure: helped build library.


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -