automationScript

Protractor Config File to resize browser

Nowadays every application is built to support responsive behavior. As a tester, we need to test the application in different browser sizes. You will be happy to know that using a simple trick we can resize browser and perform responsive design testing of any application using Protractor config file.

In your protractor config file, instead of maximizing the browser window, just set the size of the window in the OnPrepare() block.

Config file with multiple screen size handling or Responsive browser testing handling

Example Config file to resize browser window

Subscribe for updates