MCPcopy
hub / github.com/httprunner/httprunner / WebDriver

Interface WebDriver

hrp/pkg/uixt/interface.go:488–602  ·  view source on GitHub ↗

WebDriver defines methods supported by WebDriver drivers.

Source from the content-addressed store, hash-verified

486
487// WebDriver defines methods supported by WebDriver drivers.
488type 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

Callers 108

NewHTTPDriverMethod · 0.65
NewUSBDriverMethod · 0.65
TestDriver_NewSessionFunction · 0.65
NewUIADriverFunction · 0.65
RunMethod · 0.65
TestDriver_QuitFunction · 0.65
TestIOSDemoFunction · 0.65
TestViaUSBFunction · 0.65
Test_remoteWD_StatusFunction · 0.65
TestDriver_StatusFunction · 0.65
Test_remoteWD_DeviceInfoFunction · 0.65

Implementers 2

adbDriverhrp/pkg/uixt/android_adb_driver.go
wdaDriverhrp/pkg/uixt/ios_driver.go

Calls

no outgoing calls

Tested by

no test coverage detected