19 lines
558 B
Go
19 lines
558 B
Go
package marionette
|
|
|
|
type SessionResponse struct {
|
|
SessionID string `json:"sessionId"`
|
|
Capabilities map[string]any `json:"capabilities"`
|
|
}
|
|
|
|
func (t *TCPTransport) CmdNewSession(capabilities map[string]any) (SessionResponse, error) {
|
|
if capabilities == nil {
|
|
capabilities = make(map[string]any)
|
|
}
|
|
return DoCommand[SessionResponse](t, "WebDriver:NewSession", capabilities)
|
|
}
|
|
|
|
func (t *TCPTransport) CmdQuit() (map[string]any, error) {
|
|
// TODO: accept flags, safeMode args
|
|
return DoCommand[map[string]any](t, "Marionette:Quit", struct{}{})
|
|
}
|