screen: add tap function
This commit is contained in:
@@ -28,6 +28,12 @@ func (d *Device) ToggleScreen() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Tap on a location on the screen
|
||||
func (d *Device) TapScreen(x int, y int) error {
|
||||
_, err := d.RunCommand(fmt.Sprintf("shell input tap %d %d", x, y))
|
||||
return err
|
||||
}
|
||||
|
||||
// Get the resolution of the screen
|
||||
func (d *Device) GetScreenResolution() (int, int, error) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user