Sha256: b01c8c072644b772fc866b6f7ada40d1ec06fe6bc8d9d9d940a05217082df065

Contents?: true

Size: 1.09 KB

Versions: 27

Compression:

Stored size: 1.09 KB

Contents

module Appium
  module Ios
    module Xcuitest
      module PasteBoard
        # @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"
        #   ```
        def set_pasteboard(content:, encoding: nil)
          args = { content: content }
          args[:encoding] = encoding if encoding

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

        # @option opts [string] :encoding Encoding of the received pasteboard content. UTF-8 by default.
        #
        #   ```ruby
        #   get_pasteboard encoding: "shift-jis"
        #   ```
        def get_pasteboard(encoding: nil)
          args = {}
          args[:encoding] = encoding if encoding

          @driver.execute_script 'mobile: getPasteboard', args
        end
      end
    end # module Xcuitest
  end # module Ios
end # module Appium

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
appium_lib-10.2.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-10.1.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-10.0.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.18.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.17.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.16.1 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.16.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.15.2 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.15.1 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.15.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.14.3 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.14.2 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.14.1 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.14.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.13.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.12.1 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.12.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.11.1 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.11.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb
appium_lib-9.10.0 lib/appium_lib/ios/xcuitest/command/pasteboard.rb