webdriver

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	Value     AppInfoValue `json:"value"`
	SessionId string       `json:"sessionId"`
}

type AppInfoValue

type AppInfoValue struct {
	ProcessArguments struct {
		Env struct {
		} `json:"env"`
		Args []interface{} `json:"args"`
	} `json:"processArguments"`
	Name     string `json:"name"`
	Pid      int    `json:"pid"`
	BundleId string `json:"bundleId"`
}

type Build

type Build struct {
	Time                    string `json:"time"`
	ProductBundleIdentifier string `json:"productBundleIdentifier"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(address string) *Client

func (*Client) AcceptAlert

func (c *Client) AcceptAlert(accept bool) (string, error)

func (*Client) ActiveAppInfo

func (c *Client) ActiveAppInfo() (*AppInfo, error)

func (*Client) CloseSession

func (c *Client) CloseSession() error

func (*Client) CreateSession

func (c *Client) CreateSession() (*Session, error)

func (*Client) FindElement

func (c *Client) FindElement(by, value string) (*Element, error)

func (*Client) GetAlertText

func (c *Client) GetAlertText() (string, error)

func (*Client) GetSettings

func (c *Client) GetSettings() (*Settings, error)

func (*Client) Launch

func (c *Client) Launch(bundleIdentifier string, shouldWaitForQuiescence bool, arguments []string) error

func (*Client) PressButton

func (c *Client) PressButton(name string) error

func (*Client) SendText

func (c *Client) SendText(value string) error

func (*Client) SetSettings

func (c *Client) SetSettings(settings Settings) error

func (*Client) Status

func (c *Client) Status() (*Status, error)

func (*Client) TapElement

func (c *Client) TapElement(elementId string) error

func (*Client) Terminate

func (c *Client) Terminate(bundleIdentifier string) error

type Element

type Element struct {
	SessionId string        `json:"sessionId"`
	Value     *ElementValue `json:"value"`
}

type ElementButtons

type ElementButtons struct {
	SessionId string   `json:"sessionId"`
	Value     []string `json:"value"`
}

type ElementValue

type ElementValue struct {
	Element string `json:"ELEMENT"`
}

type Session

type Session struct {
	SessionID string       `json:"sessionId"`
	Value     SessionValue `json:"value"`
}

type SessionValue

type SessionValue struct {
	SessionID    string            `json:"sessionId"`
	Capabilities map[string]string `json:"capabilities"`
}

type SettingValue

type SettingValue struct {
	ShouldUseCompactResponses    bool   `json:"shouldUseCompactResponses"`
	ElementResponseAttributes    string `json:"elementResponseAttributes"`
	MjpegServerScreenshotQuality int    `json:"mjpegServerScreenshotQuality"`
	MjpegServerFramerate         int    `json:"mjpegServerFramerate"`
	MjpegScalingFactor           int    `json:"mjpegScalingFactor"`
	ScreenshotQuality            int    `json:"screenshotQuality"`
	KeyboardAutocorrection       int    `json:"keyboardAutocorrection"`
	KeyboardPrediction           bool   `json:"keyboardPrediction"`
	SnapshotTimeout              int    `json:"snapshotTimeout"`
	CustomSnapshotTimeout        int    `json:"customSnapshotTimeout"`
	SnapshotMaxDepth             int    `json:"snapshotMaxDepth"`
	UseFirstMatch                bool   `json:"useFirstMatch"`
	BoundElementsByIndex         bool   `json:"boundElementsByIndex"`
	ReduceMotion                 bool   `json:"reduceMotion"`
	DefaultActiveApplication     string `json:"defaultActiveApplication"`
	ActiveAppDetectionPoint      string `json:"activeAppDetectionPoint"`
	IncludeNonModalElements      bool   `json:"includeNonModalElements"`
	DefaultAlertAction           string `json:"defaultAlertAction"`
	AcceptAlertButtonSelector    string `json:"acceptAlertButtonSelector"`
	DismissAlertButtonSelector   string `json:"dismissAlertButtonSelector"`
	ScreenshotOrientation        string `json:"screenshotOrientation"`
	WaitForIdleTimeout           int    `json:"waitForIdleTimeout"`
	AnimationCoolOffTimeout      int    `json:"animationCoolOffTimeout"`
}

type Settings

type Settings struct {
	SessionID string                 `json:"sessionId"`
	Value     map[string]interface{} `json:"value"`
}

type Status

type Status struct {
	SessionID string      `json:"sessionId"`
	Value     StatusValue `json:"value"`
}

type StatusValue

type StatusValue struct {
	Message string            `json:"message"`
	State   string            `json:"state"`
	OS      map[string]string `json:"os"`
	IOS     map[string]string `json:"ios"`
	Ready   bool              `json:"ready"`
	Build   Build             `json:"build"`
}

type WDAConnectHook

type WDAConnectHook struct {
	Connected chan string
}
var (
	WDAHook *WDAConnectHook
)

func (*WDAConnectHook) Fire

func (hook *WDAConnectHook) Fire(entry *logrus.Entry) error

func (*WDAConnectHook) Levels

func (hook *WDAConnectHook) Levels() []logrus.Level

type WDAError

type WDAError struct {
	Value struct {
		Error     string `json:"error"`
		Message   string `json:"message"`
		Traceback string `json:"traceback"`
	} `json:"value"`
	SessionId string `json:"sessionId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL