Documentation
¶
Index ¶
- Constants
- Variables
- func Available() bool
- func ChromeActivateTab(window, index int) error
- func ChromeActive() (url, title string, err error)
- func ChromeBack() error
- func ChromeCloseTab(window, index int) error
- func ChromeGoto(url string) error
- func ChromeJS(js string) (string, error)
- func ChromeNewTab(url string) error
- func ChromeReload() error
- func ChromeState() (string, error)
- func ResetShared()
- func Tell(app string, commands ...string) (string, error)
- type AXElement
- type AppState
- type ApprovalNeeded
- type ChromeTab
- type Helper
- type Policy
- type RunningApp
- type Screenshot
- type StaleError
- type TCCStatus
Constants ¶
View Source
const ProtocolVersion = "k-brain-computer/1"
Variables ¶
View Source
var ErrJSFromAppleEvents = errors.New("chrome's 'Allow JavaScript from Apple Events' is off — enable it in Chrome: View → Developer → Allow JavaScript from Apple Events")
View Source
var ErrUnsupportedPlatform = errors.New("computer-use driver is unavailable on this platform")
Functions ¶
func ChromeActivateTab ¶
func ChromeActive ¶
func ChromeBack ¶
func ChromeBack() error
func ChromeCloseTab ¶
func ChromeGoto ¶
func ChromeNewTab ¶
func ChromeReload ¶
func ChromeReload() error
func ChromeState ¶
func ResetShared ¶
func ResetShared()
Types ¶
type AXElement ¶
type AXElement struct {
Index int `json:"index"`
Role string `json:"role"`
Subrole string `json:"subrole,omitempty"`
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
Desc string `json:"desc,omitempty"`
RoleDesc string `json:"roleDescription,omitempty"`
Position []float64 `json:"position,omitempty"`
Size []float64 `json:"size,omitempty"`
Actions []string `json:"actions,omitempty"`
Focused bool `json:"focused"`
Enabled bool `json:"enabled"`
}
type AppState ¶
type AppState struct {
Generation int `json:"generation"`
App string `json:"app"`
Elements []AXElement `json:"elements"`
Screenshot *Screenshot `json:"screenshot,omitempty"`
}
type ApprovalNeeded ¶
type ApprovalNeeded struct{ App string }
func (*ApprovalNeeded) Error ¶
func (e *ApprovalNeeded) Error() string
type ChromeTab ¶
type ChromeTab struct {
Window int `json:"window"`
Index int `json:"index"`
Title string `json:"title"`
URL string `json:"url"`
}
func ChromeFindTab ¶
func ChromeTabs ¶
type RunningApp ¶
type Screenshot ¶
type Screenshot struct {
JPEGBase64 string `json:"jpegBase64,omitempty"`
Bytes int `json:"bytes,omitempty"`
Err string `json:"error,omitempty"`
}
func (*Screenshot) Decode ¶
func (s *Screenshot) Decode() ([]byte, error)
type StaleError ¶
type StaleError struct{ Msg string }
func (*StaleError) Error ¶
func (e *StaleError) Error() string
Click to show internal directories.
Click to hide internal directories.