Permalink
Browse files

Add default parsing behavior; if no 'key' is given in RobotFramework …

…test args, defaults to 'id'
  • Loading branch information...
1 parent 83c36ec commit b9a740afa3b96c02cd22eadb5269e1725dac4cd8 @semperos committed Mar 5, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/watir_robot/parser.rb
@@ -121,6 +121,8 @@ def parse_location(loc)
return {:css => loc[4..loc.length]}
elsif loc[0..5].downcase == 'xpath='
return {:xpath => loc[6..loc.length]}
+ elsif !loc.include? '='
+ return {:id => loc}
else
# Comma-separated attributes
attr_list = loc.split(',')
@@ -172,4 +174,4 @@ def trim_sides(s)
end
-end
+end

0 comments on commit b9a740a

Please sign in to comment.