Class: Playwright::AndroidInput

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

Instance Method Summary collapse

Methods inherited from PlaywrightApi

#==, #initialize, 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.



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

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`.



10
11
12
# File 'lib/playwright_api/android_input.rb', line 10

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)


15
16
17
# File 'lib/playwright_api/android_input.rb', line 15

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

#tap_point(point) ⇒ Object

Taps at the specified ‘point`.



20
21
22
# File 'lib/playwright_api/android_input.rb', line 20

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

#type(text) ⇒ Object

Types ‘text` into currently focused widget.



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

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