module Appium::Ios::Xcuitest::PasteBoard

Public Instance Methods

get_pasteboard(encoding: nil) click to toggle source

@option opts [string] :encoding Encoding of the received pasteboard content. UTF-8 by default.

```ruby
get_pasteboard encoding: "shift-jis"
```
# 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) click to toggle source

@param [string] content The content of the pasteboard. The previous content is going to be overridden.

The parameter is mandatory

@option opts [string] :encoding Encoding of the given content. UTF-8 by default.

```ruby
set_pasteboard content: "sample content"
```
# 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