Skip to content

Commit

Permalink
Add default parsing behavior; if no 'key' is given in RobotFramework …
Browse files Browse the repository at this point in the history
…test args, defaults to 'id'
  • Loading branch information
semperos committed Mar 5, 2011
1 parent 83c36ec commit b9a740a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/watir_robot/parser.rb
Expand Up @@ -121,6 +121,8 @@ def parse_location(loc)
return {:css => loc[4..loc.length]} return {:css => loc[4..loc.length]}
elsif loc[0..5].downcase == 'xpath=' elsif loc[0..5].downcase == 'xpath='
return {:xpath => loc[6..loc.length]} return {:xpath => loc[6..loc.length]}
elsif !loc.include? '='
return {:id => loc}
else else
# Comma-separated attributes # Comma-separated attributes
attr_list = loc.split(',') attr_list = loc.split(',')
Expand Down Expand Up @@ -172,4 +174,4 @@ def trim_sides(s)


end end


end end

0 comments on commit b9a740a

Please sign in to comment.