Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChromeResolver ¶
ChromeResolver define interface to retrieve browser websocket url.
func NewChromeResolver ¶
func NewChromeResolver(addr string) (ChromeResolver, error)
type ChromeResolverAPI ¶
ChromeResolverAPI uses Chrome debug API to retrieve WebSocket URL.
func (*ChromeResolverAPI) BrowserWebSocketURL ¶
func (r *ChromeResolverAPI) BrowserWebSocketURL(ctx context.Context) (string, error)
type ChromeResolverStatic ¶
type ChromeResolverStatic struct {
WebSocketURL string
}
ChromeResolverStatic accepts WS connection string and resolve to it everytime.
func (*ChromeResolverStatic) BrowserWebSocketURL ¶
func (r *ChromeResolverStatic) BrowserWebSocketURL(ctx context.Context) (string, error)
type Opts ¶
type Opts struct { // Viewport width in pixels of the browser render. Default is 1680 Width int // Viewport height in pixels of the browser render. Default is 867 Height int // Scale from 0 Scale float64 // Format of image Format internal.ImageFormat // Quality of image Quality int // Delay before take screenshot in seconds Delay time.Duration // Capture full page screenshot FullPage bool // Set this parameter to true to scroll through the entire page before capturing a screenshot. ScrollPage bool // Clip of viewport. // All fields is required. Clip OptsClip }
Click to show internal directories.
Click to hide internal directories.