WebDriver defines methods supported by WebDriver drivers.
| 486 | |
| 487 | // WebDriver defines methods supported by WebDriver drivers. |
| 488 | type WebDriver interface { |
| 489 | // NewSession starts a new session and returns the SessionInfo. |
| 490 | NewSession(capabilities Capabilities) (SessionInfo, error) |
| 491 | |
| 492 | // DeleteSession Kills application associated with that session and removes session |
| 493 | // 1) alertsMonitor disable |
| 494 | // 2) testedApplicationBundleId terminate |
| 495 | DeleteSession() error |
| 496 | |
| 497 | Status() (DeviceStatus, error) |
| 498 | |
| 499 | DeviceInfo() (DeviceInfo, error) |
| 500 | |
| 501 | // Location Returns device location data. |
| 502 | // |
| 503 | // It requires to configure location access permission by manual. |
| 504 | // The response of 'latitude', 'longitude' and 'altitude' are always zero (0) without authorization. |
| 505 | // 'authorizationStatus' indicates current authorization status. '3' is 'Always'. |
| 506 | // https://developer.apple.com/documentation/corelocation/clauthorizationstatus |
| 507 | // |
| 508 | // Settings -> Privacy -> Location Service -> WebDriverAgent-Runner -> Always |
| 509 | // |
| 510 | // The return value could be zero even if the permission is set to 'Always' |
| 511 | // since the location service needs some time to update the location data. |
| 512 | Location() (Location, error) |
| 513 | BatteryInfo() (BatteryInfo, error) |
| 514 | WindowSize() (Size, error) |
| 515 | Screen() (Screen, error) |
| 516 | Scale() (float64, error) |
| 517 | |
| 518 | // GetTimestamp returns the timestamp of the mobile device |
| 519 | GetTimestamp() (timestamp int64, err error) |
| 520 | |
| 521 | // Homescreen Forces the device under test to switch to the home screen |
| 522 | Homescreen() error |
| 523 | |
| 524 | // AppLaunch Launch an application with given bundle identifier in scope of current session. |
| 525 | // !This method is only available since Xcode9 SDK |
| 526 | AppLaunch(packageName string) error |
| 527 | // AppTerminate Terminate an application with the given package name. |
| 528 | // Either `true` if the app has been successfully terminated or `false` if it was not running |
| 529 | AppTerminate(packageName string) (bool, error) |
| 530 | // GetForegroundApp returns current foreground app package name and activity name |
| 531 | GetForegroundApp() (app AppInfo, err error) |
| 532 | // AssertForegroundApp returns nil if the given package and activity are in foreground |
| 533 | AssertForegroundApp(packageName string, activityType ...string) error |
| 534 | |
| 535 | // StartCamera Starts a new camera for recording |
| 536 | StartCamera() error |
| 537 | // StopCamera Stops the camera for recording |
| 538 | StopCamera() error |
| 539 | |
| 540 | // Tap Sends a tap event at the coordinate. |
| 541 | Tap(x, y int, options ...ActionOption) error |
| 542 | TapFloat(x, y float64, options ...ActionOption) error |
| 543 | |
| 544 | // DoubleTap Sends a double tap event at the coordinate. |
| 545 | DoubleTap(x, y int) error |
no outgoing calls
no test coverage detected