Sha256: 0e6e367c6b26c8586c9db06889226135553da3c7c1e6f67cd9ef20082b22849d

Contents?: true

Size: 515 Bytes

Versions: 9

Compression:

Stored size: 515 Bytes

Contents

module Mohawk
  module Adapters
    module UIA
      class TabControl < Control
        include ElementLocator

        def selected_tab=(which)
          find_element(which).select
        end

        def value
          all_items.find(&:selected?).name
        end

        def items
          all_items.map &:name
        end

        private
        def all_items
          element.filter(control_type: :tab_item).map {|e| e.as :selection_item }
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mohawk-1.0 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.4.4 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.4.3 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.4.2 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.4.1 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.4 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.3 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.2.1 lib/mohawk/adapters/uia/tab_control.rb
mohawk-0.2 lib/mohawk/adapters/uia/tab_control.rb