ffctl/ffscript/cmd_misc.go

19 lines
552 B
Go
Raw Normal View History

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