Reputation: 153
When trying to get the value from a table cell using the page object gem I am getting the following error
Selenium::WebDriver::Error::JavascriptError: a is undefined
The code which errors is the following
table(:left_table, :xpath => "//*[@class ='table']")
left_table_element[1]['Publisher'].text
However curiously if I put
left_table_element[1][2].text
no errors are thrown.
When debugging I can see that the error is being thrown on the table = parent
line in the TableRow
module
def find_index_by_title(title)
table = parent
parent_tag_name = parent.element.tag_name
table = table.parent if (parent_tag_name == 'tbody' || parent_tag_name == 'thead')
table[0].find_index { |column| column.text.include? title }
end
Upvotes: 1
Views: 99
Reputation: 1229
The problem in method #parent in FireFox 35.0. Try to use older version or use Chrome.
Upvotes: 2