Class: RAutomation::Adapter::MsUia::Cell

Inherits:
Object
  • Object
show all
Includes:
Locators
Defined in:
lib/rautomation/adapter/ms_uia/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(window, locators) ⇒ Cell

Returns a new instance of Cell.



8
9
10
11
12
13
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 8

def initialize(window, locators)
  @search_information = window.search_information
  @locators = extract(locators)
  @row = window.row
  @column = @locators[:index] || 0
end

Instance Attribute Details

#column (readonly) Also known as: index

Returns the value of attribute column.



6
7
8
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 6

def column
  @column
end

#row (readonly)

Returns the value of attribute row.



6
7
8
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 6

def row
  @row
end

#search_information (readonly)

Returns the value of attribute search_information.



6
7
8
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 6

def search_information
  @search_information
end

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 15

def exists?
  UiaDll::table_coordinate_valid? search_information, row, column
end

#value Also known as: text



19
20
21
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 19

def value
  UiaDll::table_value_at search_information, row, column
end