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

Interface WebDriver

selenium.go:215–369  ·  view source on GitHub ↗

WebDriver defines methods supported by WebDriver drivers.

Source from the content-addressed store, hash-verified

213
214// WebDriver defines methods supported by WebDriver drivers.
215type WebDriver interface {
216 // Status returns various pieces of information about the server environment.
217 Status() (*Status, error)
218
219 // NewSession starts a new session and returns the session ID.
220 NewSession() (string, error)
221
222 // SessionId returns the current session ID
223 //
224 // Deprecated: This identifier is not Go-style correct. Use SessionID
225 // instead.
226 SessionId() string
227
228 // SessionID returns the current session ID.
229 SessionID() string
230
231 // SwitchSession switches to the given session ID.
232 SwitchSession(sessionID string) error
233
234 // Capabilities returns the current session's capabilities.
235 Capabilities() (Capabilities, error)
236
237 // SetAsyncScriptTimeout sets the amount of time that asynchronous scripts
238 // are permitted to run before they are aborted. The timeout will be rounded
239 // to nearest millisecond.
240 SetAsyncScriptTimeout(timeout time.Duration) error
241 // SetImplicitWaitTimeout sets the amount of time the driver should wait when
242 // searching for elements. The timeout will be rounded to nearest millisecond.
243 SetImplicitWaitTimeout(timeout time.Duration) error
244 // SetPageLoadTimeout sets the amount of time the driver should wait when
245 // loading a page. The timeout will be rounded to nearest millisecond.
246 SetPageLoadTimeout(timeout time.Duration) error
247
248 // Quit ends the current session. The browser instance will be closed.
249 Quit() error
250
251 // CurrentWindowHandle returns the ID of current window handle.
252 CurrentWindowHandle() (string, error)
253 // WindowHandles returns the IDs of current open windows.
254 WindowHandles() ([]string, error)
255 // CurrentURL returns the browser's current URL.
256 CurrentURL() (string, error)
257 // Title returns the current page's title.
258 Title() (string, error)
259 // PageSource returns the current page's source.
260 PageSource() (string, error)
261 // Close closes the current window.
262 Close() error
263 // SwitchFrame switches to the given frame. The frame parameter can be the
264 // frame's ID as a string, its WebElement instance as returned by
265 // GetElement, or nil to switch to the current top-level browsing context.
266 SwitchFrame(frame interface{}) error
267 // SwitchWindow switches the context to the specified window.
268 SwitchWindow(name string) error
269 // CloseWindow closes the specified window.
270 CloseWindow(name string) error
271 // MaximizeWindow maximizes a window. If the name is empty, the current
272 // window will be maximized.

Callers 83

testStatusFunction · 0.65
testDeleteSessionFunction · 0.65
testCapabilitiesFunction · 0.65
testSetPageLoadTimeoutFunction · 0.65
testClickFunction · 0.65
testChromeExtensionFunction · 0.65
quitRemoteFunction · 0.65
ExampleFunction · 0.65
testWindowsFunction · 0.65
testWindowsFunction · 0.65

Implementers 1

remoteWDremote.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…