refactor: merge Swipe and SwipeFloat

This commit is contained in:
lilong.129
2024-11-23 22:07:24 +08:00
parent 0b598fa590
commit 89a08f61ec
10 changed files with 11 additions and 43 deletions
-17
View File
@@ -265,23 +265,6 @@ func (s *stubIOSDriver) Drag(fromX, fromY, toX, toY float64, options ...ActionOp
return s.wdaDriver.Drag(fromX, fromY, toX, toY, options...)
}
// Swipe works like Drag, but `pressForDuration` value is 0
func (s *stubIOSDriver) Swipe(fromX, fromY, toX, toY int, options ...ActionOption) error {
err := s.setUpWda()
if err != nil {
return err
}
return s.wdaDriver.Swipe(fromX, fromY, toX, toY, options...)
}
func (s *stubIOSDriver) SwipeFloat(fromX, fromY, toX, toY float64, options ...ActionOption) error {
err := s.setUpWda()
if err != nil {
return err
}
return s.wdaDriver.SwipeFloat(fromX, fromY, toX, toY, options...)
}
// SetPasteboard Sets data to the general pasteboard
func (s *stubIOSDriver) SetPasteboard(contentType PasteboardType, content string) error {
err := s.setUpWda()