Documentation ¶
Index ¶
- Constants
- Variables
- func WDADebug(b ...bool)
- type Client
- func (c *Client) AccessibleSource() (sJson string, err error)
- func (c *Client) ActiveAppInfo() (wdaActiveAppInfo WDAActiveAppInfo, err error)
- func (c *Client) AlertAccept(label ...string) (err error)
- func (c *Client) AlertDismiss(label ...string) (err error)
- func (c *Client) AlertText() (text string, err error)
- func (c *Client) AppLaunchUnattached(bundleId string) (err error)
- func (c *Client) DeviceInfo() (wdaDeviceInfo WDADeviceInfo, err error)
- func (c *Client) GetUSBMjpegHTTPClient() (*http.Client, string, error)
- func (c *Client) HealthCheck() (err error)
- func (c *Client) Homescreen() (err error)
- func (c *Client) IsLocked() (bool, error)
- func (c *Client) IsWdaHealth() (isHealth bool, err error)
- func (c *Client) Lock() (err error)
- func (c *Client) NewSession(capabilities ...WDASessionCapability) (s *Session, err error)
- func (c *Client) Screenshot() (raw *bytes.Buffer, err error)
- func (c *Client) ScreenshotToDisk(filename string) (err error)
- func (c *Client) ScreenshotToImage() (img image.Image, format string, err error)
- func (c *Client) SetAcceptAlertButtonSelector(classChainSelector string)
- func (c *Client) SetDismissAlertButtonSelector(classChainSelector string)
- func (c *Client) Source(srcOpt ...WDASourceOption) (s string, err error)
- func (c *Client) Status() (sJson string, err error)
- func (c *Client) Unlock() (err error)
- func (c *Client) WdaShutdown() (err error)
- type Device
- type Element
- func (e *Element) Clear() (err error)
- func (e *Element) Click() (err error)
- func (e *Element) DoubleTap() error
- func (e *Element) Drag(fromX, fromY, toX, toY int, pressForDuration ...int) (err error)
- func (e *Element) DragFloat(fromX, fromY, toX, toY float64, pressForDuration ...float64) (err error)
- func (e *Element) FindElement(wdaLocator WDALocator) (element *Element, err error)
- func (e *Element) FindElements(wdaLocator WDALocator) (elements []*Element, err error)
- func (e *Element) FindVisibleCells() (elements []*Element, err error)
- func (e *Element) ForceTouch(pressure float64, duration ...float64) (err error)
- func (e *Element) ForceTouchCoordinate(wdaCoordinate WDACoordinate, pressure float64, duration ...float64) (err error)
- func (e *Element) GetAttribute(attr WDAElementAttribute) (value string, err error)
- func (e *Element) IsAccessibilityContainer() (isAccessibilityContainer bool, err error)
- func (e *Element) IsAccessible() (isAccessible bool, err error)
- func (e *Element) IsDisplayed() (isDisplayed bool, err error)
- func (e *Element) IsEnabled() (isEnabled bool, err error)
- func (e *Element) IsSelected() (isSelected bool, err error)
- func (e *Element) Label() (string, error)
- func (e *Element) Name() (string, error)
- func (e *Element) PickerWheelSelect(order WDAPickerWheelSelectOrder, offset ...int) (err error)
- func (e *Element) PickerWheelSelectNext(offset ...int) (err error)
- func (e *Element) PickerWheelSelectPrevious(offset ...int) (err error)
- func (e *Element) Pinch(scale, velocity float64) (err error)
- func (e *Element) PinchToZoomIn() (err error)
- func (e *Element) PinchToZoomOut() (err error)
- func (e *Element) PinchToZoomOutByActions(scale ...float64) (err error)
- func (e *Element) Rect() (wdaRect WDARect, err error)
- func (e *Element) Rotate(rotation float64, velocity ...float64) (err error)
- func (e *Element) Screenshot() (raw *bytes.Buffer, err error)
- func (e *Element) ScreenshotToDisk(filename string) (err error)
- func (e *Element) ScreenshotToImage() (img image.Image, format string, err error)
- func (e *Element) ScrollDown(distance ...float64) (err error)
- func (e *Element) ScrollElementByName(name string) (err error)
- func (e *Element) ScrollElementByPredicate(predicate string) (err error)
- func (e *Element) ScrollLeft(distance ...float64) (err error)
- func (e *Element) ScrollRight(distance ...float64) (err error)
- func (e *Element) ScrollToVisible() (err error)
- func (e *Element) ScrollUp(distance ...float64) (err error)
- func (e *Element) SendKeys(text string, typingFrequency ...int) error
- func (e *Element) Swipe(fromX, fromY, toX, toY int) (err error)
- func (e *Element) SwipeDirection(direction WDASwipeDirection) (err error)
- func (e *Element) SwipeDown() (err error)
- func (e *Element) SwipeFloat(fromX, fromY, toX, toY float64) (err error)
- func (e *Element) SwipeLeft() (err error)
- func (e *Element) SwipeRight() (err error)
- func (e *Element) SwipeUp() (err error)
- func (e *Element) Tap(x, y int) error
- func (e *Element) TapFloat(x, y float64) error
- func (e *Element) TapWithNumberOfTaps(numberOfTaps, numberOfTouches int) (err error)
- func (e *Element) Text() (text string, err error)
- func (e *Element) TouchAndHold(duration ...int) (err error)
- func (e *Element) TouchAndHoldFloat(duration ...float64) (err error)
- func (e *Element) TwoFingerTap() (err error)
- func (e *Element) Type() (elemType string, err error)
- func (e *Element) Value() (string, error)
- type Session
- func (s *Session) AccessibleSource() (sJson string, err error)
- func (s *Session) ActiveAppInfo() (wdaActiveAppInfo WDAActiveAppInfo, err error)
- func (s *Session) ActiveAppsList() (appsList []WDAAppBaseInfo, err error)
- func (s *Session) ActiveElement() (element *Element, err error)
- func (s *Session) AlertAccept(label ...string) (err error)
- func (s *Session) AlertButtons() (buttons []string, err error)
- func (s *Session) AlertDismiss(label ...string) (err error)
- func (s *Session) AlertSendKeys(text string) (err error)
- func (s *Session) AlertText() (text string, err error)
- func (s *Session) AppActivate(bundleId string) (err error)
- func (s *Session) AppDeactivate(seconds ...float64) (err error)
- func (s *Session) AppLaunch(bundleId string, opt ...WDAAppLaunchOption) (err error)
- func (s *Session) AppState(bundleId string) (appRunState WDAAppRunState, err error)
- func (s *Session) AppTerminate(bundleId string) (err error)
- func (s *Session) BatteryInfo() (wdaBatteryInfo WDABatteryInfo, err error)
- func (s *Session) DeleteSession() (err error)
- func (s *Session) DeviceInfo() (wdaDeviceInfo WDADeviceInfo, err error)
- func (s *Session) DoubleTap(x, y int) (err error)
- func (s *Session) DoubleTapFloat(x, y float64) (err error)
- func (s *Session) Drag(fromX, fromY, toX, toY int, pressForDuration ...int) (err error)
- func (s *Session) DragFloat(fromX, fromY, toX, toY float64, pressForDuration ...float64) (err error)
- func (s *Session) FindElement(wdaLocator WDALocator) (element *Element, err error)
- func (s *Session) FindElements(wdaLocator WDALocator) (elements []*Element, err error)
- func (s *Session) ForceTouch(x, y int, pressure float64, duration ...float64) (err error)
- func (s *Session) ForceTouchCoordinate(coordinate WDACoordinate, pressure float64, duration ...float64) (err error)
- func (s *Session) ForceTouchFloat(x, y, pressure float64, duration ...float64) (err error)
- func (s *Session) GetActiveSession() (wdaSessionInfo WDASessionInfo, err error)
- func (s *Session) GetAppiumSettings() (sJson string, err error)
- func (s *Session) GetPasteboard(contentType WDAContentType) (raw *bytes.Buffer, err error)
- func (s *Session) GetPasteboardForImage() (img image.Image, format string, err error)
- func (s *Session) GetPasteboardForImageToDisk(filename string) (err error)
- func (s *Session) GetPasteboardForPlaintext() (content string, err error)
- func (s *Session) GetPasteboardForUrl() (content string, err error)
- func (s *Session) IsLocked() (bool, error)
- func (s *Session) Lock() (err error)
- func (s *Session) MatchTouchID(isMatch bool) (bool, error)
- func (s *Session) Orientation() (orientation WDAOrientation, err error)
- func (s *Session) PerformActions(actions *WDAActions) (err error)
- func (s *Session) PerformTouchActions(touchActions *WDATouchActions) (err error)
- func (s *Session) PressButton(wdaDeviceButton WDADeviceButtonName) (err error)
- func (s *Session) PressHomeButton() (err error)
- func (s *Session) PressVolumeDownButton() (err error)
- func (s *Session) PressVolumeUpButton() (err error)
- func (s *Session) Rotation() (wdaRotation WDARotation, err error)
- func (s *Session) Scale() (scale float64, err error)
- func (s *Session) Screen() (wdaScreen WDAScreen, err error)
- func (s *Session) Screenshot(element ...*Element) (raw *bytes.Buffer, err error)
- func (s *Session) ScreenshotToDisk(filename string, element ...*Element) (err error)
- func (s *Session) ScreenshotToImage(element ...*Element) (img image.Image, format string, err error)
- func (s *Session) SendKeys(text string, typingFrequency ...int) error
- func (s *Session) SetAppiumSetting(key string, value interface{}) (sJson string, err error)
- func (s *Session) SetAppiumSettings(settings map[string]interface{}) (sJson string, err error)
- func (s *Session) SetOrientation(orientation WDAOrientation) (err error)
- func (s *Session) SetPasteboard(contentType WDAContentType, content string) (err error)
- func (s *Session) SetPasteboardForImageFromFile(filename string) (err error)
- func (s *Session) SetPasteboardForPlaintext(content string) (err error)
- func (s *Session) SetPasteboardForUrl(url string) (err error)
- func (s *Session) SetRotation(wdaRotation WDARotation) (err error)
- func (s *Session) SiriActivate(text string) (err error)
- func (s *Session) SiriOpenURL(url string) (err error)
- func (s *Session) Source(srcOpt ...WDASourceOption) (sTree string, err error)
- func (s *Session) StatusBarSize() (wdaStatusBarSize WDASize, err error)
- func (s *Session) Swipe(fromX, fromY, toX, toY int) (err error)
- func (s *Session) SwipeCoordinate(fromCoordinate, toCoordinate WDACoordinate) (err error)
- func (s *Session) SwipeDown() (err error)
- func (s *Session) SwipeFloat(fromX, fromY, toX, toY float64) (err error)
- func (s *Session) SwipeLeft() (err error)
- func (s *Session) SwipeRight() (err error)
- func (s *Session) SwipeUp() (err error)
- func (s *Session) Tap(x, y int) error
- func (s *Session) TapCoordinate(wdaCoordinate WDACoordinate) error
- func (s *Session) TapFloat(x, y float64) error
- func (s *Session) TouchAndHold(x, y int, duration ...int) (err error)
- func (s *Session) TouchAndHoldFloat(x, y float64, duration ...float64) (err error)
- func (s *Session) Unlock() (err error)
- func (s *Session) Wait(condition WDACondition) error
- func (s *Session) WaitWithTimeout(condition WDACondition, timeout float64) error
- func (s *Session) WaitWithTimeoutAndInterval(condition WDACondition, timeout, interval float64) (err error)
- func (s *Session) WindowSize() (wdaSize WDASize, err error)
- type WDAActionOptionFinger
- func (aof *WDAActionOptionFinger) Down() *WDAActionOptionFinger
- func (aof *WDAActionOptionFinger) Move(ofm WDAActionOptionFingerMove) *WDAActionOptionFinger
- func (aof *WDAActionOptionFinger) Pause(duration ...float64) *WDAActionOptionFinger
- func (aof *WDAActionOptionFinger) Up() *WDAActionOptionFinger
- type WDAActionOptionFingerMove
- func (ofm WDAActionOptionFingerMove) SetDuration(duration float64) WDAActionOptionFingerMove
- func (ofm WDAActionOptionFingerMove) SetOrigin(element *Element) WDAActionOptionFingerMove
- func (ofm WDAActionOptionFingerMove) SetXY(x, y int) WDAActionOptionFingerMove
- func (ofm WDAActionOptionFingerMove) SetXYFloat(x, y float64) WDAActionOptionFingerMove
- type WDAActions
- func (act *WDAActions) DoubleTap(x, y int, element ...*Element) *WDAActions
- func (act *WDAActions) FingerActionOption(actOptFinger *WDAActionOptionFinger) *WDAActions
- func (act *WDAActions) Press(x, y int, duration float64, element ...*Element) *WDAActions
- func (act *WDAActions) SendKeys(text string) *WDAActions
- func (act *WDAActions) Swipe(fromX, fromY, toX, toY int, element ...*Element) *WDAActions
- func (act *WDAActions) SwipeCoordinate(fromCoordinate, toCoordinate WDACoordinate, element ...*Element) *WDAActions
- func (act *WDAActions) SwipeFloat(fromX, fromY, toX, toY float64, element ...*Element) *WDAActions
- func (act *WDAActions) Tap(x, y int, element ...*Element) *WDAActions
- type WDAActiveAppInfo
- type WDAAppBaseInfo
- type WDAAppLaunchOption
- type WDAAppRunState
- type WDABatteryInfo
- type WDABatteryState
- type WDACondition
- type WDAContentType
- type WDACoordinate
- type WDADeviceButtonName
- type WDADeviceInfo
- type WDAElementAttribute
- func (ea WDAElementAttribute) SetAccessibilityContainer(b bool) WDAElementAttribute
- func (ea WDAElementAttribute) SetAccessible(b bool) WDAElementAttribute
- func (ea WDAElementAttribute) SetEnabled(b bool) WDAElementAttribute
- func (ea WDAElementAttribute) SetLabel(s string) WDAElementAttribute
- func (ea WDAElementAttribute) SetName(s string) WDAElementAttribute
- func (ea WDAElementAttribute) SetSelected(b bool) WDAElementAttribute
- func (ea WDAElementAttribute) SetType(elemType WDAElementType) WDAElementAttribute
- func (ea WDAElementAttribute) SetUID(uid string) WDAElementAttribute
- func (ea WDAElementAttribute) SetValue(s string) WDAElementAttribute
- func (ea WDAElementAttribute) SetVisible(b bool) WDAElementAttribute
- func (ea WDAElementAttribute) String() string
- type WDAElementType
- type WDALocator
- type WDAOrientation
- type WDAPickerWheelSelectOrder
- type WDARect
- type WDARotation
- type WDAScreen
- type WDASessionCapability
- func (sc WDASessionCapability) SetAppLaunchOption(opt WDAAppLaunchOption) WDASessionCapability
- func (sc WDASessionCapability) SetDefaultAlertAction(sAlertAction WDASessionDefaultAlertAction) WDASessionCapability
- func (sc WDASessionCapability) SetElementResponseAttributes(s string) WDASessionCapability
- func (sc WDASessionCapability) SetEventloopIdleDelaySec(seconds int) WDASessionCapability
- func (sc WDASessionCapability) SetMaxTypingFrequency(n int) WDASessionCapability
- func (sc WDASessionCapability) SetShouldUseCompactResponses(b bool) WDASessionCapability
- func (sc WDASessionCapability) SetShouldUseSingletonTestManager(b bool) WDASessionCapability
- func (sc WDASessionCapability) SetShouldUseTestManagerForVisibilityDetection(b bool) WDASessionCapability
- type WDASessionDefaultAlertAction
- type WDASessionInfo
- type WDASize
- type WDASourceOption
- type WDASwipeDirection
- type WDATouchActionOptionLongPress
- func (tao WDATouchActionOptionLongPress) SetElement(element *Element) WDATouchActionOptionLongPress
- func (tao WDATouchActionOptionLongPress) SetXY(x, y int) WDATouchActionOptionLongPress
- func (tao WDATouchActionOptionLongPress) SetXYCoordinate(coordinate WDACoordinate) WDATouchActionOptionLongPress
- func (tao WDATouchActionOptionLongPress) SetXYFloat(x, y float64) WDATouchActionOptionLongPress
- type WDATouchActionOptionMoveTo
- func (tao WDATouchActionOptionMoveTo) SetElement(element *Element) WDATouchActionOptionMoveTo
- func (tao WDATouchActionOptionMoveTo) SetXY(x, y int) WDATouchActionOptionMoveTo
- func (tao WDATouchActionOptionMoveTo) SetXYCoordinate(coordinate WDACoordinate) WDATouchActionOptionMoveTo
- func (tao WDATouchActionOptionMoveTo) SetXYFloat(x, y float64) WDATouchActionOptionMoveTo
- type WDATouchActionOptionPress
- func (tao WDATouchActionOptionPress) SetElement(element *Element) WDATouchActionOptionPress
- func (tao WDATouchActionOptionPress) SetPressure(pressure float64) WDATouchActionOptionPress
- func (tao WDATouchActionOptionPress) SetXY(x, y int) WDATouchActionOptionPress
- func (tao WDATouchActionOptionPress) SetXYCoordinate(coordinate WDACoordinate) WDATouchActionOptionPress
- func (tao WDATouchActionOptionPress) SetXYFloat(x, y float64) WDATouchActionOptionPress
- type WDATouchActionOptionTap
- func (tao WDATouchActionOptionTap) SetCount(count int) WDATouchActionOptionTap
- func (tao WDATouchActionOptionTap) SetElement(element *Element) WDATouchActionOptionTap
- func (tao WDATouchActionOptionTap) SetXY(x, y int) WDATouchActionOptionTap
- func (tao WDATouchActionOptionTap) SetXYFloat(x, y float64) WDATouchActionOptionTap
- type WDATouchActions
- func (ta *WDATouchActions) Cancel() *WDATouchActions
- func (ta *WDATouchActions) LongPress(optLongPress WDATouchActionOptionLongPress) *WDATouchActions
- func (ta *WDATouchActions) MoveTo(optMoveTo WDATouchActionOptionMoveTo) *WDATouchActions
- func (ta *WDATouchActions) Press(optPress WDATouchActionOptionPress) *WDATouchActions
- func (ta *WDATouchActions) Release() *WDATouchActions
- func (ta *WDATouchActions) Tap(optTap WDATouchActionOptionTap) *WDATouchActions
- func (ta *WDATouchActions) Wait(duration ...float64) *WDATouchActions
Constants ¶
const ( WDATextBackspaceSequence = "\u0008" WDATextDeleteSequence = "\u007F" )
Variables ¶
var DefaultWaitInterval = time.Millisecond * 250
var DefaultWaitTimeout = time.Second * 60
Functions ¶
Types ¶
type Client ¶
func NewClient ¶
NewClient
when `isInitializesAlertButtonSelector` is `true`
AcceptAlertButtonSelector: **/XCUIElementTypeButton[`label IN {'允许','好','仅在使用应用期间','暂不'}`] DismissAlertButtonSelector: **/XCUIElementTypeButton[`label IN {'不允许','暂不'}`]
func NewUSBClient ¶
func (*Client) AccessibleSource ¶
AccessibleSource
Return application elements accessibility tree ¶
ignore all elements except for the main window for accessibility tree
func (*Client) ActiveAppInfo ¶
func (c *Client) ActiveAppInfo() (wdaActiveAppInfo WDAActiveAppInfo, err error)
ActiveAppInfo
get current active application
func (*Client) AlertAccept ¶
func (*Client) AlertDismiss ¶
func (*Client) AppLaunchUnattached ¶
AppLaunchUnattached
Launch the app with the specified bundle ID ¶
shouldWaitForQuiescence: false
func (*Client) DeviceInfo ¶
func (c *Client) DeviceInfo() (wdaDeviceInfo WDADeviceInfo, err error)
DeviceInfo
func (*Client) GetUSBMjpegHTTPClient ¶
func (*Client) HealthCheck ¶
HealthCheck
Checks health of XCTest by:
- Querying application for some elements,
- Triggering some device events.
!!! Health check might modify simulator state so it should only be called in-between testing sessions
func (*Client) IsWdaHealth ¶
func (*Client) Lock ¶
Lock
Forces the device under test to switch to the lock screen. An immediate return will happen if the device is already locked and an error is going to be thrown if the screen has not been locked after the timeout.
func (*Client) NewSession ¶
func (c *Client) NewSession(capabilities ...WDASessionCapability) (s *Session, err error)
NewSession
Creates and saves new session for application
func (*Client) ScreenshotToDisk ¶
ScreenshotToDisk
func (*Client) ScreenshotToImage ¶
ScreenshotToImage
func (*Client) SetAcceptAlertButtonSelector ¶
SetAcceptAlertButtonSelector
Sets custom class chain locators for accept/dismiss alert buttons location.
This might be useful if the default buttons detection algorithm fails to determine alert buttons properly when defaultAlertAction is set.
func (*Client) SetDismissAlertButtonSelector ¶
SetDismissAlertButtonSelector
func (*Client) Source ¶
func (c *Client) Source(srcOpt ...WDASourceOption) (s string, err error)
Source
func (*Client) Unlock ¶
Unlock
Forces the device under test to unlock. An immediate return will happen if the device is already unlocked and an error is going to be thrown if the screen has not been unlocked after the timeout.
func (*Client) WdaShutdown ¶
type Device ¶
type Device struct { WDAPort int MjpegPort int IsInitializesAlertButtonSelector bool // contains filtered or unexported fields }
func DeviceList ¶
func (Device) SerialNumber ¶
type Element ¶
type Element struct { UID string // contains filtered or unexported fields }
func (*Element) DoubleTap ¶
DoubleTap
Sends a double tap event to a hittable point computed for the element.
func (*Element) Drag ¶
Drag
Clicks and holds for a specified duration (generally long enough to start a drag operation) then drags to the other coordinate.
func (*Element) FindElement ¶
func (e *Element) FindElement(wdaLocator WDALocator) (element *Element, err error)
FindElement
func (*Element) FindElements ¶
func (e *Element) FindElements(wdaLocator WDALocator) (elements []*Element, err error)
FindElements
func (*Element) FindVisibleCells ¶
FindVisibleCells
func (*Element) ForceTouchCoordinate ¶
func (e *Element) ForceTouchCoordinate(wdaCoordinate WDACoordinate, pressure float64, duration ...float64) (err error)
func (*Element) GetAttribute ¶
func (e *Element) GetAttribute(attr WDAElementAttribute) (value string, err error)
GetAttribute
Returns value of given property specified in WebDriver Spec Check the FBElement protocol to get list of supported attributes. This method also supports shortcuts, like wdName == name, wdValue == value.
func (*Element) IsAccessibilityContainer ¶
func (*Element) IsAccessible ¶
func (*Element) IsDisplayed ¶
func (*Element) IsSelected ¶
func (*Element) PickerWheelSelect ¶
func (e *Element) PickerWheelSelect(order WDAPickerWheelSelectOrder, offset ...int) (err error)
func (*Element) PickerWheelSelectNext ¶
func (*Element) PickerWheelSelectPrevious ¶
func (*Element) Pinch ¶
Pinch
Sends a pinching gesture with two touches.
The system makes a best effort to synthesize the requested scale and velocity: absolute accuracy is not guaranteed. Some values may not be possible based on the size of the element's frame - these will result in test failures.
@param scale The scale of the pinch gesture. Use a scale between 0 and 1 to "pinch close" or zoom out and a scale greater than 1 to "pinch open" or zoom in.
@param velocity The velocity of the pinch in scale factor per second.
func (*Element) PinchToZoomOutByActions ¶
func (*Element) Rotate ¶
Rotate
Sends a rotation gesture with two touches.
The system makes a best effort to synthesize the requested rotation and velocity: absolute accuracy is not guaranteed. Some values may not be possible based on the size of the element's frame - these will result in test failures.
@param rotation The rotation of the gesture in radians.
@param velocity The velocity of the rotation gesture in radians per second.
func (*Element) Screenshot ¶
Screenshot
func (*Element) ScreenshotToDisk ¶
ScreenshotToDisk
func (*Element) ScreenshotToImage ¶
ScreenshotToImage
func (*Element) ScrollDown ¶
func (*Element) ScrollElementByName ¶
ScrollElementByName
func (*Element) ScrollElementByPredicate ¶
func (*Element) ScrollLeft ¶
func (*Element) ScrollRight ¶
func (*Element) ScrollToVisible ¶
func (*Element) Swipe ¶
Swipe
element.frame.origin.x + [request.arguments[@"fromX"] doubleValue] element.frame.origin.y + [request.arguments[@"fromY"] doubleValue] element.frame.origin.x + [request.arguments[@"toX"] doubleValue] element.frame.origin.y + [request.arguments[@"toY"] doubleValue]
func (*Element) SwipeDirection ¶
func (e *Element) SwipeDirection(direction WDASwipeDirection) (err error)
SwipeDirection
Sends a swipe gesture in the specified direction.
func (*Element) SwipeFloat ¶
func (*Element) TapWithNumberOfTaps ¶
TapWithNumberOfTaps
Sends one or more taps with one of more touch points.
func (*Element) TouchAndHold ¶
TouchAndHold
Sends a long press gesture to a hittable point computed for the element, holding for the specified duration.
func (*Element) TouchAndHoldFloat ¶
func (*Element) TwoFingerTap ¶
TwoFingerTap
Sends a two finger tap event to a hittable point computed for the element.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) AccessibleSource ¶
AccessibleSource
Return application elements accessibility tree ¶
ignore all elements except for the main window for accessibility tree
func (*Session) ActiveAppInfo ¶
func (s *Session) ActiveAppInfo() (wdaActiveAppInfo WDAActiveAppInfo, err error)
ActiveAppInfo
get current active application
func (*Session) ActiveAppsList ¶
func (s *Session) ActiveAppsList() (appsList []WDAAppBaseInfo, err error)
ActiveAppsList
use multitasking on iPad
func (*Session) ActiveElement ¶
ActiveElement
returns the currently active element
[NSPredicate predicateWithFormat:@"hasKeyboardFocus == YES"]
func (*Session) AlertAccept ¶
func (*Session) AlertButtons ¶
func (*Session) AlertDismiss ¶
func (*Session) AlertSendKeys ¶
func (*Session) AppActivate ¶
AppActivate
Activate the application by restoring it from the background. Nothing will happen if the application is already in foreground. This method is only supported since Xcode9.
func (*Session) AppDeactivate ¶
AppDeactivate
Deactivates application for given time and then activate it again
func (*Session) AppLaunch ¶
func (s *Session) AppLaunch(bundleId string, opt ...WDAAppLaunchOption) (err error)
AppLaunch
Launch an application with given bundle identifier in scope of current session. !This method is only available since Xcode9 SDK
Default wait for quiescence
- registerApplicationWithBundleId
- launch OR activate
func (*Session) AppState ¶
func (s *Session) AppState(bundleId string) (appRunState WDAAppRunState, err error)
AppState
Get the state of the particular application in scope of the current session. !This method is only returning reliable results since Xcode9 SDK
func (*Session) AppTerminate ¶
AppTerminate
Close the application by bundleId
- unregisterApplicationWithBundleId
func (*Session) BatteryInfo ¶
func (s *Session) BatteryInfo() (wdaBatteryInfo WDABatteryInfo, err error)
BatteryInfo
level - Battery level in range [0.0, 1.0], where 1.0 means 100% charge. state - Battery state. The following values are possible: UIDeviceBatteryStateUnplugged = 1 // on battery, discharging UIDeviceBatteryStateCharging = 2 // plugged in, less than 100% UIDeviceBatteryStateFull = 3 // plugged in, at 100%
func (*Session) DeleteSession ¶
DeleteSession
kill session (and App) associated with that request
- alertsMonitor disable
- testedApplicationBundleId terminate
func (*Session) DeviceInfo ¶
func (s *Session) DeviceInfo() (wdaDeviceInfo WDADeviceInfo, err error)
DeviceInfo
func (*Session) DoubleTapFloat ¶
func (*Session) Drag ¶
Drag
Clicks and holds for a specified duration (generally long enough to start a drag operation) then drags to the other coordinate.
func (*Session) FindElement ¶
func (s *Session) FindElement(wdaLocator WDALocator) (element *Element, err error)
FindElement
func (*Session) FindElements ¶
func (s *Session) FindElements(wdaLocator WDALocator) (elements []*Element, err error)
FindElements
func (*Session) ForceTouch ¶
func (*Session) ForceTouchCoordinate ¶
func (s *Session) ForceTouchCoordinate(coordinate WDACoordinate, pressure float64, duration ...float64) (err error)
func (*Session) ForceTouchFloat ¶
func (*Session) GetActiveSession ¶
func (s *Session) GetActiveSession() (wdaSessionInfo WDASessionInfo, err error)
GetActiveSession
get current session information
func (*Session) GetAppiumSettings ¶
func (*Session) GetPasteboard ¶
func (s *Session) GetPasteboard(contentType WDAContentType) (raw *bytes.Buffer, err error)
GetPasteboard
It might work when `WebDriverAgentRunner` is in foreground on real devices. https://github.com/appium/WebDriverAgent/issues/330
func (*Session) GetPasteboardForImage ¶
func (*Session) GetPasteboardForImageToDisk ¶
func (*Session) GetPasteboardForPlaintext ¶
func (*Session) GetPasteboardForUrl ¶
func (*Session) Lock ¶
Lock
Forces the device under test to switch to the lock screen. An immediate return will happen if the device is already locked and an error is going to be thrown if the screen has not been locked after the timeout.
func (*Session) Orientation ¶
func (s *Session) Orientation() (orientation WDAOrientation, err error)
func (*Session) PerformActions ¶
func (s *Session) PerformActions(actions *WDAActions) (err error)
PerformActions
fb_performW3CActions
func (*Session) PerformTouchActions ¶
func (s *Session) PerformTouchActions(touchActions *WDATouchActions) (err error)
PerformTouchActions
fb_performAppiumTouchActions
func (*Session) PressButton ¶
func (s *Session) PressButton(wdaDeviceButton WDADeviceButtonName) (err error)
PressButton
Presses the corresponding hardware button on the device !!! not a synchronous action
func (*Session) PressHomeButton ¶
func (*Session) PressVolumeDownButton ¶
func (*Session) PressVolumeUpButton ¶
func (*Session) Rotation ¶
func (s *Session) Rotation() (wdaRotation WDARotation, err error)
func (*Session) ScreenshotToDisk ¶
ScreenshotToDisk
func (*Session) ScreenshotToImage ¶
func (s *Session) ScreenshotToImage(element ...*Element) (img image.Image, format string, err error)
ScreenshotToImage
func (*Session) SetAppiumSetting ¶
func (*Session) SetAppiumSettings ¶
func (*Session) SetOrientation ¶
func (s *Session) SetOrientation(orientation WDAOrientation) (err error)
func (*Session) SetPasteboard ¶
func (s *Session) SetPasteboard(contentType WDAContentType, content string) (err error)
SetPasteboard Sets data to the general pasteboard
func (*Session) SetPasteboardForImageFromFile ¶
SetPasteboardForImageFromFile
func (*Session) SetPasteboardForPlaintext ¶
SetPasteboardForType
func (*Session) SetPasteboardForUrl ¶
SetPasteboardForUrl
func (*Session) SetRotation ¶
func (s *Session) SetRotation(wdaRotation WDARotation) (err error)
func (*Session) SiriActivate ¶
SiriActivate
Activates Siri service voice recognition with the given text to parse
func (*Session) SiriOpenURL ¶
SiriOpenURL Open {%@} It doesn't actually work, right?
func (*Session) Source ¶
func (s *Session) Source(srcOpt ...WDASourceOption) (sTree string, err error)
Source
func (*Session) StatusBarSize ¶
StatusBarSize
func (*Session) SwipeCoordinate ¶
func (s *Session) SwipeCoordinate(fromCoordinate, toCoordinate WDACoordinate) (err error)
func (*Session) SwipeFloat ¶
func (*Session) TapCoordinate ¶
func (s *Session) TapCoordinate(wdaCoordinate WDACoordinate) error
TapCoordinate
func (*Session) TouchAndHoldFloat ¶
func (*Session) Unlock ¶
Unlock
Forces the device under test to unlock. An immediate return will happen if the device is already unlocked and an error is going to be thrown if the screen has not been unlocked after the timeout.
func (*Session) Wait ¶
func (s *Session) Wait(condition WDACondition) error
Wait works like WaitWithTimeoutAndInterval, but using the default timeout and polling interval.
func (*Session) WaitWithTimeout ¶
func (s *Session) WaitWithTimeout(condition WDACondition, timeout float64) error
WaitWithTimeout works like WaitWithTimeoutAndInterval, but with default polling interval.
func (*Session) WaitWithTimeoutAndInterval ¶
func (s *Session) WaitWithTimeoutAndInterval(condition WDACondition, timeout, interval float64) (err error)
WaitWithTimeoutAndInterval waits for the condition to evaluate to true.
type WDAActionOptionFinger ¶
type WDAActionOptionFinger []wdaBody
func NewWDAActionOptionFinger ¶
func NewWDAActionOptionFinger(cap ...int) *WDAActionOptionFinger
func (*WDAActionOptionFinger) Down ¶
func (aof *WDAActionOptionFinger) Down() *WDAActionOptionFinger
func (*WDAActionOptionFinger) Move ¶
func (aof *WDAActionOptionFinger) Move(ofm WDAActionOptionFingerMove) *WDAActionOptionFinger
func (*WDAActionOptionFinger) Pause ¶
func (aof *WDAActionOptionFinger) Pause(duration ...float64) *WDAActionOptionFinger
func (*WDAActionOptionFinger) Up ¶
func (aof *WDAActionOptionFinger) Up() *WDAActionOptionFinger
type WDAActionOptionFingerMove ¶
type WDAActionOptionFingerMove wdaBody
func NewWWDAActionOptionFingerMove ¶
func NewWWDAActionOptionFingerMove() WDAActionOptionFingerMove
func (WDAActionOptionFingerMove) SetDuration ¶
func (ofm WDAActionOptionFingerMove) SetDuration(duration float64) WDAActionOptionFingerMove
func (WDAActionOptionFingerMove) SetOrigin ¶
func (ofm WDAActionOptionFingerMove) SetOrigin(element *Element) WDAActionOptionFingerMove
func (WDAActionOptionFingerMove) SetXY ¶
func (ofm WDAActionOptionFingerMove) SetXY(x, y int) WDAActionOptionFingerMove
func (WDAActionOptionFingerMove) SetXYFloat ¶
func (ofm WDAActionOptionFingerMove) SetXYFloat(x, y float64) WDAActionOptionFingerMove
type WDAActions ¶
type WDAActions []wdaBody
func NewWDAActions ¶
func NewWDAActions(cap ...int) *WDAActions
func (*WDAActions) DoubleTap ¶
func (act *WDAActions) DoubleTap(x, y int, element ...*Element) *WDAActions
func (*WDAActions) FingerActionOption ¶
func (act *WDAActions) FingerActionOption(actOptFinger *WDAActionOptionFinger) *WDAActions
func (*WDAActions) Press ¶
func (act *WDAActions) Press(x, y int, duration float64, element ...*Element) *WDAActions
func (*WDAActions) SendKeys ¶
func (act *WDAActions) SendKeys(text string) *WDAActions
func (*WDAActions) Swipe ¶
func (act *WDAActions) Swipe(fromX, fromY, toX, toY int, element ...*Element) *WDAActions
func (*WDAActions) SwipeCoordinate ¶
func (act *WDAActions) SwipeCoordinate(fromCoordinate, toCoordinate WDACoordinate, element ...*Element) *WDAActions
func (*WDAActions) SwipeFloat ¶
func (act *WDAActions) SwipeFloat(fromX, fromY, toX, toY float64, element ...*Element) *WDAActions
func (*WDAActions) Tap ¶
func (act *WDAActions) Tap(x, y int, element ...*Element) *WDAActions
type WDAActiveAppInfo ¶
type WDAActiveAppInfo struct { ProcessArguments struct { Env interface{} `json:"env"` Args []interface{} `json:"args"` } `json:"processArguments"` Name string `json:"name"` WDAAppBaseInfo // contains filtered or unexported fields }
func (WDAActiveAppInfo) String ¶
func (aai WDAActiveAppInfo) String() string
type WDAAppBaseInfo ¶
type WDAAppLaunchOption ¶
type WDAAppLaunchOption wdaBody
launch application configuration
func NewWDAAppLaunchOption ¶
func NewWDAAppLaunchOption() WDAAppLaunchOption
func (WDAAppLaunchOption) SetArguments ¶
func (alo WDAAppLaunchOption) SetArguments(args []string) WDAAppLaunchOption
SetArguments
The optional array of application command line arguments. The arguments are going to be applied if the application was not running before.
func (WDAAppLaunchOption) SetEnvironment ¶
func (alo WDAAppLaunchOption) SetEnvironment(env map[string]string) WDAAppLaunchOption
SetEnvironment
The optional dictionary of environment variables for the application, which is going to be executed. The environment variables are going to be applied if the application was not running before.
func (WDAAppLaunchOption) SetShouldWaitForQuiescence ¶
func (alo WDAAppLaunchOption) SetShouldWaitForQuiescence(b bool) WDAAppLaunchOption
SetShouldWaitForQuiescence
It allows to turn on/off waiting for application quiescence, while performing queries.
type WDAAppRunState ¶
type WDAAppRunState int
const ( WDAAppNotRunning WDAAppRunState = 1 << iota WDAAppRunningBack WDAAppRunningFront )
func (WDAAppRunState) String ¶
func (v WDAAppRunState) String() string
type WDABatteryInfo ¶
type WDABatteryInfo struct { Level float64 `json:"level"` // Battery level in range [0.0, 1.0], where 1.0 means 100% charge. State WDABatteryState `json:"state"` // Battery state ( 1: on battery, discharging; 2: plugged in, less than 100%, 3: plugged in, at 100% ) // contains filtered or unexported fields }
func (WDABatteryInfo) String ¶
func (bi WDABatteryInfo) String() string
type WDABatteryState ¶
type WDABatteryState int
const ( WDABatteryUnplugged WDABatteryState = iota // on battery, discharging WDABatteryCharging // plugged in, less than 100% WDABatteryFull // plugged in, at 100% )
func (WDABatteryState) String ¶
func (v WDABatteryState) String() string
type WDACondition ¶
type WDAContentType ¶
type WDAContentType string
const ( WDAContentTypePlaintext WDAContentType = "plaintext" WDAContentTypeImage WDAContentType = "image" WDAContentTypeUrl WDAContentType = "url" )
type WDACoordinate ¶
type WDADeviceButtonName ¶
type WDADeviceButtonName string
const ( WDADeviceButtonHome WDADeviceButtonName = "home" WDADeviceButtonVolumeUp WDADeviceButtonName = "volumeUp" WDADeviceButtonVolumeDown WDADeviceButtonName = "volumeDown" )
type WDADeviceInfo ¶
type WDADeviceInfo struct { TimeZone string `json:"timeZone"` CurrentLocale string `json:"currentLocale"` Model string `json:"model"` UUID string `json:"uuid"` UserInterfaceIdiom int `json:"userInterfaceIdiom"` UserInterfaceStyle string `json:"userInterfaceStyle"` Name string `json:"name"` IsSimulator bool `json:"isSimulator"` // contains filtered or unexported fields }
func (WDADeviceInfo) String ¶
func (di WDADeviceInfo) String() string
type WDAElementAttribute ¶
type WDAElementAttribute wdaBody
func NewWDAElementAttribute ¶
func NewWDAElementAttribute() WDAElementAttribute
func (WDAElementAttribute) SetAccessibilityContainer ¶
func (ea WDAElementAttribute) SetAccessibilityContainer(b bool) WDAElementAttribute
SetAccessibilityContainer
Whether element is an accessibility container (contains children of any depth that are accessible)
func (WDAElementAttribute) SetAccessible ¶
func (ea WDAElementAttribute) SetAccessible(b bool) WDAElementAttribute
SetAccessible
Whether element is accessible
func (WDAElementAttribute) SetEnabled ¶
func (ea WDAElementAttribute) SetEnabled(b bool) WDAElementAttribute
SetEnabled
Whether element is enabled
func (WDAElementAttribute) SetLabel ¶
func (ea WDAElementAttribute) SetLabel(s string) WDAElementAttribute
SetLabel
Element's label
func (WDAElementAttribute) SetName ¶
func (ea WDAElementAttribute) SetName(s string) WDAElementAttribute
SetName
Element's name
func (WDAElementAttribute) SetSelected ¶
func (ea WDAElementAttribute) SetSelected(b bool) WDAElementAttribute
SetSelected
Element's selected state
func (WDAElementAttribute) SetType ¶
func (ea WDAElementAttribute) SetType(elemType WDAElementType) WDAElementAttribute
SetType
Element's type
func (WDAElementAttribute) SetUID ¶
func (ea WDAElementAttribute) SetUID(uid string) WDAElementAttribute
SetUID
Element's unique identifier
func (WDAElementAttribute) SetValue ¶
func (ea WDAElementAttribute) SetValue(s string) WDAElementAttribute
SetValue
Element's value
func (WDAElementAttribute) SetVisible ¶
func (ea WDAElementAttribute) SetVisible(b bool) WDAElementAttribute
SetVisible
Whether element is visible
func (WDAElementAttribute) String ¶
func (ea WDAElementAttribute) String() string
type WDAElementType ¶
type WDAElementType struct { Any bool `json:"XCUIElementTypeAny"` Other bool `json:"XCUIElementTypeOther"` Application bool `json:"XCUIElementTypeApplication"` Group bool `json:"XCUIElementTypeGroup"` Window bool `json:"XCUIElementTypeWindow"` Sheet bool `json:"XCUIElementTypeSheet"` Drawer bool `json:"XCUIElementTypeDrawer"` Alert bool `json:"XCUIElementTypeAlert"` Dialog bool `json:"XCUIElementTypeDialog"` Button bool `json:"XCUIElementTypeButton"` RadioButton bool `json:"XCUIElementTypeRadioButton"` RadioGroup bool `json:"XCUIElementTypeRadioGroup"` CheckBox bool `json:"XCUIElementTypeCheckBox"` DisclosureTriangle bool `json:"XCUIElementTypeDisclosureTriangle"` PopUpButton bool `json:"XCUIElementTypePopUpButton"` ComboBox bool `json:"XCUIElementTypeComboBox"` MenuButton bool `json:"XCUIElementTypeMenuButton"` ToolbarButton bool `json:"XCUIElementTypeToolbarButton"` Popover bool `json:"XCUIElementTypePopover"` Keyboard bool `json:"XCUIElementTypeKeyboard"` Key bool `json:"XCUIElementTypeKey"` TabBar bool `json:"XCUIElementTypeTabBar"` TabGroup bool `json:"XCUIElementTypeTabGroup"` Toolbar bool `json:"XCUIElementTypeToolbar"` StatusBar bool `json:"XCUIElementTypeStatusBar"` Table bool `json:"XCUIElementTypeTable"` TableRow bool `json:"XCUIElementTypeTableRow"` TableColumn bool `json:"XCUIElementTypeTableColumn"` Outline bool `json:"XCUIElementTypeOutline"` OutlineRow bool `json:"XCUIElementTypeOutlineRow"` Browser bool `json:"XCUIElementTypeBrowser"` CollectionView bool `json:"XCUIElementTypeCollectionView"` Slider bool `json:"XCUIElementTypeSlider"` PageIndicator bool `json:"XCUIElementTypePageIndicator"` ProgressIndicator bool `json:"XCUIElementTypeProgressIndicator"` ActivityIndicator bool `json:"XCUIElementTypeActivityIndicator"` SegmentedControl bool `json:"XCUIElementTypeSegmentedControl"` Picker bool `json:"XCUIElementTypePicker"` PickerWheel bool `json:"XCUIElementTypePickerWheel"` Switch bool `json:"XCUIElementTypeSwitch"` Toggle bool `json:"XCUIElementTypeToggle"` Link bool `json:"XCUIElementTypeLink"` Image bool `json:"XCUIElementTypeImage"` Icon bool `json:"XCUIElementTypeIcon"` SearchField bool `json:"XCUIElementTypeSearchField"` ScrollView bool `json:"XCUIElementTypeScrollView"` ScrollBar bool `json:"XCUIElementTypeScrollBar"` StaticText bool `json:"XCUIElementTypeStaticText"` TextField bool `json:"XCUIElementTypeTextField"` SecureTextField bool `json:"XCUIElementTypeSecureTextField"` DatePicker bool `json:"XCUIElementTypeDatePicker"` TextView bool `json:"XCUIElementTypeTextView"` Menu bool `json:"XCUIElementTypeMenu"` MenuItem bool `json:"XCUIElementTypeMenuItem"` MenuBar bool `json:"XCUIElementTypeMenuBar"` MenuBarItem bool `json:"XCUIElementTypeMenuBarItem"` Map bool `json:"XCUIElementTypeMap"` WebView bool `json:"XCUIElementTypeWebView"` IncrementArrow bool `json:"XCUIElementTypeIncrementArrow"` DecrementArrow bool `json:"XCUIElementTypeDecrementArrow"` Timeline bool `json:"XCUIElementTypeTimeline"` RatingIndicator bool `json:"XCUIElementTypeRatingIndicator"` ValueIndicator bool `json:"XCUIElementTypeValueIndicator"` SplitGroup bool `json:"XCUIElementTypeSplitGroup"` Splitter bool `json:"XCUIElementTypeSplitter"` RelevanceIndicator bool `json:"XCUIElementTypeRelevanceIndicator"` ColorWell bool `json:"XCUIElementTypeColorWell"` HelpTag bool `json:"XCUIElementTypeHelpTag"` Matte bool `json:"XCUIElementTypeMatte"` DockItem bool `json:"XCUIElementTypeDockItem"` Ruler bool `json:"XCUIElementTypeRuler"` RulerMarker bool `json:"XCUIElementTypeRulerMarker"` Grid bool `json:"XCUIElementTypeGrid"` LevelIndicator bool `json:"XCUIElementTypeLevelIndicator"` Cell bool `json:"XCUIElementTypeCell"` LayoutArea bool `json:"XCUIElementTypeLayoutArea"` LayoutItem bool `json:"XCUIElementTypeLayoutItem"` Handle bool `json:"XCUIElementTypeHandle"` Stepper bool `json:"XCUIElementTypeStepper"` Tab bool `json:"XCUIElementTypeTab"` TouchBar bool `json:"XCUIElementTypeTouchBar"` StatusItem bool `json:"XCUIElementTypeStatusItem"` }
WDAElementType !!! This mapping should be updated if there are changes after each new XCTest release"`
func (WDAElementType) String ¶
func (et WDAElementType) String() string
type WDALocator ¶
type WDALocator struct { ClassName WDAElementType `json:"class name"` // isSearchByIdentifier Name string `json:"name"` Id string `json:"id"` AccessibilityId string `json:"accessibility id"` // partialSearch LinkText WDAElementAttribute `json:"link text"` PartialLinkText WDAElementAttribute `json:"partial link text"` Predicate string `json:"predicate string"` ClassChain string `json:"class chain"` XPath string `json:"xpath"` }
type WDAOrientation ¶
type WDAOrientation string
const ( WDAOrientationPortrait WDAOrientation = "PORTRAIT" // Device oriented vertically, home button on the bottom WDAOrientationPortraitUpsideDown WDAOrientation = "UIA_DEVICE_ORIENTATION_PORTRAIT_UPSIDEDOWN" // Device oriented vertically, home button on the top WDAOrientationLandscapeLeft WDAOrientation = "LANDSCAPE" // Device oriented horizontally, home button on the right WDAOrientationLandscapeRight WDAOrientation = "UIA_DEVICE_ORIENTATION_LANDSCAPERIGHT" // Device oriented horizontally, home button on the left )
func (WDAOrientation) String ¶
func (v WDAOrientation) String() string
type WDAPickerWheelSelectOrder ¶
type WDAPickerWheelSelectOrder string
const ( WDAPickerWheelSelectOrderNext WDAPickerWheelSelectOrder = "next" WDAPickerWheelSelectOrderPrevious WDAPickerWheelSelectOrder = "previous" )
type WDARect ¶
type WDARect struct { WDACoordinate WDASize }
type WDARotation ¶
type WDARotation struct { X int `json:"x"` Y int `json:"y"` Z int `json:"z"` // contains filtered or unexported fields }
func (WDARotation) String ¶
func (r WDARotation) String() string
type WDAScreen ¶
type WDASessionCapability ¶
type WDASessionCapability wdaBody
func NewWDASessionCapability ¶
func NewWDASessionCapability(bundleId ...string) WDASessionCapability
NewWDASessionCapability
Default wait for quiescence
func (WDASessionCapability) SetAppLaunchOption ¶
func (sc WDASessionCapability) SetAppLaunchOption(opt WDAAppLaunchOption) WDASessionCapability
SetAppLaunchOption
func (WDASessionCapability) SetDefaultAlertAction ¶
func (sc WDASessionCapability) SetDefaultAlertAction(sAlertAction WDASessionDefaultAlertAction) WDASessionCapability
SetDefaultAlertAction
Creates and saves new session for application with default alert handling behaviour ¶
Default is disabled
func (WDASessionCapability) SetElementResponseAttributes ¶
func (sc WDASessionCapability) SetElementResponseAttributes(s string) WDASessionCapability
SetElementResponseAttributes
Default is `"type,label"` static NSString *FBElementResponseAttributes = @"type,label";
func (WDASessionCapability) SetEventloopIdleDelaySec ¶
func (sc WDASessionCapability) SetEventloopIdleDelaySec(seconds int) WDASessionCapability
SetEventloopIdleDelaySec
Once the methods were swizzled they stay like that since the only change in the implementation is the thread sleep, which is skipped on setting it to zero.
<= 0 disableEventLoopDelay
Default is `0` static NSTimeInterval eventloopIdleDelay = 0;
func (WDASessionCapability) SetMaxTypingFrequency ¶
func (sc WDASessionCapability) SetMaxTypingFrequency(n int) WDASessionCapability
SetMaxTypingFrequency
Default is `60` static NSUInteger FBMaxTypingFrequency = 60;
func (WDASessionCapability) SetShouldUseCompactResponses ¶
func (sc WDASessionCapability) SetShouldUseCompactResponses(b bool) WDASessionCapability
SetShouldUseCompactResponses
Default is `true` static BOOL FBShouldUseCompactResponses = YES;
func (WDASessionCapability) SetShouldUseSingletonTestManager ¶
func (sc WDASessionCapability) SetShouldUseSingletonTestManager(b bool) WDASessionCapability
SetShouldUseSingletonTestManager
Default is `true` static BOOL FBShouldUseSingletonTestManager = YES;
func (WDASessionCapability) SetShouldUseTestManagerForVisibilityDetection ¶
func (sc WDASessionCapability) SetShouldUseTestManagerForVisibilityDetection(b bool) WDASessionCapability
SetShouldUseTestManagerForVisibilityDetection
Default is `false` static BOOL FBShouldUseTestManagerForVisibilityDetection = NO;
type WDASessionDefaultAlertAction ¶
type WDASessionDefaultAlertAction string
const ( WDASessionAlertActionAccept WDASessionDefaultAlertAction = "accept" WDASessionAlertActionDismiss WDASessionDefaultAlertAction = "dismiss" )
type WDASessionInfo ¶
type WDASessionInfo struct { Capabilities struct { CFBundleIdentifier string `json:"CFBundleIdentifier"` BrowserName string `json:"browserName"` Device string `json:"device"` SdkVersion string `json:"sdkVersion"` } `json:"capabilities"` SessionID string `json:"sessionId"` // contains filtered or unexported fields }
func (WDASessionInfo) String ¶
func (si WDASessionInfo) String() string
type WDASize ¶
type WDASourceOption ¶
type WDASourceOption wdaBody
func NewWDASourceOption ¶
func NewWDASourceOption() WDASourceOption
NewWDASourceOption
Default: "format": "xml"
func (WDASourceOption) SetExcludedAttributes ¶
func (so WDASourceOption) SetExcludedAttributes(excludedAttributes []string) WDASourceOption
SetExcludedAttributes
only `xml` supported.
func (WDASourceOption) SetFormatAsDescription ¶
func (so WDASourceOption) SetFormatAsDescription() WDASourceOption
func (WDASourceOption) SetFormatAsJson ¶
func (so WDASourceOption) SetFormatAsJson() WDASourceOption
func (WDASourceOption) SetFormatAsXml ¶
func (so WDASourceOption) SetFormatAsXml() WDASourceOption
type WDASwipeDirection ¶
type WDASwipeDirection string
const ( WDASwipeDirectionUp WDASwipeDirection = "up" WDASwipeDirectionDown WDASwipeDirection = "down" WDASwipeDirectionLeft WDASwipeDirection = "left" WDASwipeDirectionRight WDASwipeDirection = "right" )
type WDATouchActionOptionLongPress ¶
type WDATouchActionOptionLongPress wdaBody
func NewWDATouchActionOptionLongPress ¶
func NewWDATouchActionOptionLongPress() WDATouchActionOptionLongPress
func (WDATouchActionOptionLongPress) SetElement ¶
func (tao WDATouchActionOptionLongPress) SetElement(element *Element) WDATouchActionOptionLongPress
func (WDATouchActionOptionLongPress) SetXY ¶
func (tao WDATouchActionOptionLongPress) SetXY(x, y int) WDATouchActionOptionLongPress
func (WDATouchActionOptionLongPress) SetXYCoordinate ¶
func (tao WDATouchActionOptionLongPress) SetXYCoordinate(coordinate WDACoordinate) WDATouchActionOptionLongPress
func (WDATouchActionOptionLongPress) SetXYFloat ¶
func (tao WDATouchActionOptionLongPress) SetXYFloat(x, y float64) WDATouchActionOptionLongPress
type WDATouchActionOptionMoveTo ¶
type WDATouchActionOptionMoveTo wdaBody
func NewWDATouchActionOptionMoveTo ¶
func NewWDATouchActionOptionMoveTo() WDATouchActionOptionMoveTo
func (WDATouchActionOptionMoveTo) SetElement ¶
func (tao WDATouchActionOptionMoveTo) SetElement(element *Element) WDATouchActionOptionMoveTo
func (WDATouchActionOptionMoveTo) SetXY ¶
func (tao WDATouchActionOptionMoveTo) SetXY(x, y int) WDATouchActionOptionMoveTo
func (WDATouchActionOptionMoveTo) SetXYCoordinate ¶
func (tao WDATouchActionOptionMoveTo) SetXYCoordinate(coordinate WDACoordinate) WDATouchActionOptionMoveTo
func (WDATouchActionOptionMoveTo) SetXYFloat ¶
func (tao WDATouchActionOptionMoveTo) SetXYFloat(x, y float64) WDATouchActionOptionMoveTo
type WDATouchActionOptionPress ¶
type WDATouchActionOptionPress wdaBody
func NewWDATouchActionOptionPress ¶
func NewWDATouchActionOptionPress() WDATouchActionOptionPress
func (WDATouchActionOptionPress) SetElement ¶
func (tao WDATouchActionOptionPress) SetElement(element *Element) WDATouchActionOptionPress
func (WDATouchActionOptionPress) SetPressure ¶
func (tao WDATouchActionOptionPress) SetPressure(pressure float64) WDATouchActionOptionPress
func (WDATouchActionOptionPress) SetXY ¶
func (tao WDATouchActionOptionPress) SetXY(x, y int) WDATouchActionOptionPress
func (WDATouchActionOptionPress) SetXYCoordinate ¶
func (tao WDATouchActionOptionPress) SetXYCoordinate(coordinate WDACoordinate) WDATouchActionOptionPress
func (WDATouchActionOptionPress) SetXYFloat ¶
func (tao WDATouchActionOptionPress) SetXYFloat(x, y float64) WDATouchActionOptionPress
type WDATouchActionOptionTap ¶
type WDATouchActionOptionTap wdaBody
func NewWDATouchActionOptionTap ¶
func NewWDATouchActionOptionTap() WDATouchActionOptionTap
func (WDATouchActionOptionTap) SetCount ¶
func (tao WDATouchActionOptionTap) SetCount(count int) WDATouchActionOptionTap
func (WDATouchActionOptionTap) SetElement ¶
func (tao WDATouchActionOptionTap) SetElement(element *Element) WDATouchActionOptionTap
func (WDATouchActionOptionTap) SetXY ¶
func (tao WDATouchActionOptionTap) SetXY(x, y int) WDATouchActionOptionTap
func (WDATouchActionOptionTap) SetXYFloat ¶
func (tao WDATouchActionOptionTap) SetXYFloat(x, y float64) WDATouchActionOptionTap
type WDATouchActions ¶
type WDATouchActions []wdaBody
func NewWDATouchActions ¶
func NewWDATouchActions(cap ...int) *WDATouchActions
func (*WDATouchActions) Cancel ¶
func (ta *WDATouchActions) Cancel() *WDATouchActions
func (*WDATouchActions) LongPress ¶
func (ta *WDATouchActions) LongPress(optLongPress WDATouchActionOptionLongPress) *WDATouchActions
func (*WDATouchActions) MoveTo ¶
func (ta *WDATouchActions) MoveTo(optMoveTo WDATouchActionOptionMoveTo) *WDATouchActions
func (*WDATouchActions) Press ¶
func (ta *WDATouchActions) Press(optPress WDATouchActionOptionPress) *WDATouchActions
func (*WDATouchActions) Release ¶
func (ta *WDATouchActions) Release() *WDATouchActions
func (*WDATouchActions) Tap ¶
func (ta *WDATouchActions) Tap(optTap WDATouchActionOptionTap) *WDATouchActions
func (*WDATouchActions) Wait ¶
func (ta *WDATouchActions) Wait(duration ...float64) *WDATouchActions