Permalink
Browse files

Fix _findOption() to allow select option by text #261

  • Loading branch information...
1 parent 4f8e602 commit abf33294ae49806b8d065aca0a47caada58f44b5 @nauhygon committed Jan 19, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/zombie/browser.coffee
@@ -576,6 +576,9 @@ class Browser extends EventEmitter
for option in field.options
if option.label == value
return option
+ for option in field.options
+ if option.textContent.replace(/^\s+|\s+$/g, '') == value
+ return option
throw new Error("No OPTION '#{value}'")
else
throw new Error("No SELECT matching '#{selector}'")

1 comment on commit abf3329

@nauhygon
Owner

Issue# should be #260.

Please sign in to comment.