2024-02-09 08:59:56 +00:00
|
|
|
package marionette
|
2024-02-09 08:49:16 +00:00
|
|
|
|
|
|
|
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{}{})
|
|
|
|
}
|