MCPcopy Create free account
hub / github.com/tebeka/selenium / StartFrameBufferWithOptions

Function StartFrameBufferWithOptions

service.go:77–95  ·  view source on GitHub ↗

StartFrameBufferWithOptions causes an X virtual frame buffer to start before the WebDriver service. The frame buffer process will be terminated when the service itself is stopped.

(options FrameBufferOptions)

Source from the content-addressed store, hash-verified

75// the WebDriver service. The frame buffer process will be terminated when the
76// service itself is stopped.
77func StartFrameBufferWithOptions(options FrameBufferOptions) ServiceOption {
78 return func(s *Service) error {
79 if s.display != "" {
80 return fmt.Errorf("service display already set: %v", s.display)
81 }
82 if s.xauthPath != "" {
83 return fmt.Errorf("service xauth path already set: %v", s.xauthPath)
84 }
85 if s.xvfb != nil {
86 return fmt.Errorf("service Xvfb instance already running")
87 }
88 fb, err := NewFrameBufferWithOptions(options)
89 if err != nil {
90 return fmt.Errorf("error starting frame buffer: %v", err)
91 }
92 s.xvfb = fb
93 return Display(fb.Display, fb.AuthPath)(s)
94 }
95}
96
97// Output specifies that the WebDriver service should log to the provided
98// writer.

Callers 1

StartFrameBufferFunction · 0.85

Calls 2

DisplayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…