Module: Appium::Ios::Xcuitest::PasteBoard

Defined in:
lib/appium_lib/ios/xcuitest/command/pasteboard.rb

Instance Method Summary collapse

Instance Method Details

#get_pasteboard(encoding: nil) ⇒ Object

Parameters:

  • opts (Hash)

    a customizable set of options



38
39
40
41
42
43
# File 'lib/appium_lib/ios/xcuitest/command/pasteboard.rb', line 38

def get_pasteboard(encoding: nil)
  args = {}
  args[:encoding] = encoding if encoding

  @driver.execute_script 'mobile: getPasteboard', args
end

#set_pasteboard(content:, encoding: nil) ⇒ Object

Parameters:

  • content (string)

    The content of the pasteboard. The previous content is going to be overridden. The parameter is mandatory

  • opts (Hash)

    a customizable set of options



26
27
28
29
30
31
# File 'lib/appium_lib/ios/xcuitest/command/pasteboard.rb', line 26

def set_pasteboard(content:, encoding: nil)
  args = { content: content }
  args[:encoding] = encoding if encoding

  @driver.execute_script 'mobile: setPasteboard', args
end