sclevine / agouti

A WebDriver client and acceptance testing library for Go
MIT License
822 stars 105 forks source link

Set Browser Width and Height and Browser Type #120

Closed stnight closed 6 years ago

stnight commented 7 years ago

Is there anyway to achieve this? I'm using PhantomJS as the web driver and I would like to set an options for the headless browser. Based from the godoc there is an Option struct but it didn't explain on how to set some options for the browser,

sclevine commented 7 years ago

Hi @stnight,

You can change the window size using agouti.Page.Size. I'm not sure what you mean by "browser type" for PhantomJS.

You may be looking for the agouti.Desired option that takes an agouti.Capabilities type, which lets you pass configuration to the WebDriver when the session is created.