lib/symbiont/web_objects/table.rb in symbiont-0.1.4 vs lib/symbiont/web_objects/table.rb in symbiont-0.1.5
- old
+ new
@@ -8,9 +8,10 @@
# the index provided is a string, the text will be matched with the text from the first
# column.
# @return [Symbiont::WebObjects::TableRow]
def [](index)
index = find_by_title(index) if index.kind_of?(String)
+ return nil unless index
Object::Symbiont::WebObjects::TableRow.new(@web_object[index])
end
# This method is an iterator that returns a TableRow object each time through
# the loop.