lib/testcentricity_web/web_elements/table.rb
# Click the link object embedded within the specified cell in a table object.
#
# @param row [Integer] row number
# @param column [Integer] column number
# @example
#   list_table.click_table_cell_link(3, 1)
#
Click the link object embedded within the specified cell in a table object.
Click the link object embedded within the specified cell in a table object .
def click_table_cell_link(row, column)
      row_count = get_row_count
      raise "Row #{row} exceeds number of rows (#{row_count}) in table #{object_ref_message}" if row > row_count
      column_count = get_column_count
      raise "Column #{column} exceeds number of columns (#{column_count}) in table #{object_ref_message}" if column > column_count
      set_table_cell_locator(row, column)
      saved_locator = @alt_locator
      case @locator_type
      when :xpath
        set_alt_locator("#{@alt_locator}//a")
        set_alt_locator("#{saved_locator}//span/a") unless exists?
        unless exists?
          set_alt_locator("#{saved_locator}//input")
          set_alt_locator("#{saved_locator}//textarea") unless exists?
          send_keys(:tab) if exists?
          set_alt_locator("#{saved_locator}//a")
          set_alt_locator("#{saved_locator}//span/a") unless exists?
          send_keys(:tab) unless exists?
        end
      when :css
        set_alt_locator("#{@alt_locator} a")
        set_alt_locator("#{saved_locator} span > a") unless exists?
        unless exists?
          set_alt_locator("#{saved_locator} input")
          set_alt_locator("#{saved_locator} textarea") unless exists?
          send_keys(:tab) if exists?
          set_alt_locator("#{saved_locator} a")
          set_alt_locator("#{saved_locator} span > a") unless exists?
          send_keys(:tab) unless exists?
        end
      end
      wait_until_exists(1)
      click
      clear_alt_locator
    end
def click_table_cell_link ( row , column ) row_count = get_row_count raise "Row #{row} exceeds number of rows (#{row_count}) in table #{object_ref_message}" if row > row_count column_count = get_column_count raise "Column #{column} exceeds number of columns (#{column_count}) in table #{object_ref_message}" if column > column_count set_table_cell_locator ( row , column ) saved_locator = @alt_locator case @locator_type when :xpath set_alt_locator ( "#{@alt_locator}//a" ) set_alt_locator ( "#{saved_locator}//span/a" ) unless exists? unless exists? set_alt_locator ( "#{saved_locator}//input" ) set_alt_locator ( "#{saved_locator}//textarea" ) unless exists? send_keys ( :tab ) if exists? set_alt_locator ( "#{saved_locator}//a" ) set_alt_locator ( "#{saved_locator}//span/a" ) unless exists? send_keys ( :tab ) unless exists? end when :css set_alt_locator ( "#{@alt_locator} a" ) set_alt_locator ( "#{saved_locator} span > a" ) unless exists? unless exists? set_alt_locator ( "#{saved_locator} input" ) set_alt_locator ( "#{saved_locator} textarea" ) unless exists? send_keys ( :tab ) if exists? set_alt_locator ( "#{saved_locator} a" ) set_alt_locator ( "#{saved_locator} span > a" ) unless exists? send_keys ( :tab ) unless exists? end end wait_until_exists ( 1 ) click clear_alt_locator end
Click the link object embedded within the specified cell in a table object.
Click the link object embedded within the specified cell in a table object .
# if link not present, check for text entry fields and try to dismiss by tabbing out # if link not present, check for text entry fields and try to dismiss by tabbing out
row
None
column
None
example
None