Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

[Scripted Browser] issue with resizing browser window


Hi All,

I couldn’t find a similar topic, maybe it’s just me! :slight_smile:

The use case: I’ve been trying to simulate a mobile device & run a synthetic test on a website from Dublin public location.

For simplicity I’ve removed most of the script, and tried running even just the following:

  return $browser.get('').then(function(){})

But it produces the following error:
failed to change window state to normal, current state is maximized

I’ve tried running setPosition(), the same error is shown. Looking through some fora, it’d seem that Chrome since certain version doesn’t allow JS to control the browser window.

Could you advise?
Thank you & best regards,


Hi, @maciej.piekos: You may find this thread helpful:

Feature Idea: [Scripted Browser] Allowing users to choose the size of the browser window

Hi @philweber,

Thank you very much. I’ve read that thread, but running in a popup seems like a workaround, I had hoped that we might have resolved the issue since then.

Windows management might get a bit tricky in this case, i.e. if my popup opens another window. We’ll see where it opens.

Thank you, nevertheless. Are you aware if there are any plans on allowing users to choose the window size / maximized?

Best regards,


I think it is a limitation with Google Chrome. Chrome does not allow JavaScript to resize the main browser window (try it here: I am not aware of any plans to allow you to choose initial window size.