Pregunta

I'm using Protractor to do some e2e testing with an ng-grid, and I can't see all of the columns on my screen. I would like to make the window wider than the screen, so everything is shows in the window and there is no need to scroll.

I tried the following, but it doesn't make the window any bigger than my screen.

browser.driver.manage().window().setPosition(0, 0);
browser.driver.manage().window().setSize(2000, 3000);

Any ideas on how I could force it to be bigger? Thanks!

¿Fue útil?

Solución

You can't do it using setSize in the same way you can't do it with window.resizeTo.

Alternatives are OS specific:

Linux:

Need to enable virtual screen resolutions, e.g.

xrandr --output LVDS1 --mode 1366x768 --fb 2000x3000 --panning 2000x3000

Where 1366x768 is the real display resolution of your physical display. And 2000x3000 is the virtual resolution you want to achieve.

Windows:

Need to enable Remote Desktop Connections on windows machine.

And need to connect by setting up a custom resolution, for example from linux command line:

export MACHINE_IP=10.0.2.15
export WIN_USER_NAME=brendan
export WIN_USER_PWD=secret

rdesktop ${MACHINE_IP} -u ${WIN_USER_NAME} -p ${WIN_USER_PWD} -x b -a 16bpp -g "2000x3000" -r sound:off

Mac:

idk if exists. feel free to edit and add one

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top