Class: Playwright::AndroidInput

Inherits:
PlaywrightApi show all
Defined in:
lib/playwright_api/android_input.rb

Instance Method Summary collapse

Methods inherited from PlaywrightApi

#initialize, unwrap, wrap

Constructor Details

This class inherits a constructor from Playwright::PlaywrightApi

Instance Method Details

#drag(from, to, steps) ⇒ Object

Performs a drag between ‘from` and `to` points.



6
7
8
# File 'lib/playwright_api/android_input.rb', line 6

def drag(from, to, steps)
  wrap_impl(@impl.drag(unwrap_impl(from), unwrap_impl(to), unwrap_impl(steps)))
end

#press(key) ⇒ Object

Presses the ‘key`.



12
13
14
# File 'lib/playwright_api/android_input.rb', line 12

def press(key)
  wrap_impl(@impl.press(unwrap_impl(key)))
end

#swipe(from, segments, steps) ⇒ Object

Swipes following the path defined by ‘segments`.

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/playwright_api/android_input.rb', line 18

def swipe(from, segments, steps)
  raise NotImplementedError.new('swipe is not implemented yet.')
end

#tap_point(point) ⇒ Object

Taps at the specified ‘point`.



24
25
26
# File 'lib/playwright_api/android_input.rb', line 24

def tap_point(point)
  wrap_impl(@impl.tap_point(unwrap_impl(point)))
end

#type(text) ⇒ Object

Types ‘text` into currently focused widget.



30
31
32
# File 'lib/playwright_api/android_input.rb', line 30

def type(text)
  wrap_impl(@impl.type(unwrap_impl(text)))
end