cheezy/page-object — Issue #63: Don`t find button element using :css
Author: ivaravko
Created: 2012-03-08 20:42:03+00:00
State: open

Perform a example https://gist.github.com/2003189 and do not find button using `:css => "input[type='submit']"` or `:css => "#save"`:
``~/projects/set$ ruby test_button_css.rb
/home/ivaravko/.rvm/gems/ruby-1.9.3-p125@webdriver/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/common/search_context.rb:38:in `find_element': undefined method `to_sym' for nil:NilClass (NoMethodError)
from /home/ivaravko/.rvm/gems/ruby-1.9.3-p125@webdriver/gems/page-object-0.6.3/lib/page-object/platforms/selenium_webdriver/page_object.rb:479:in `block in click_button_for'
from /home/ivaravko/.rvm/gems/ruby-1.9.3-p125@webdriver/gems/page-object-0.6.3/lib/page-object/platforms/selenium_webdriver/page_object.rb:821:in `process_selenium_call'
from /home/ivaravko/.rvm/gems/ruby-1.9.3-p125@webdriver/gems/page-object-0.6.3/lib/page-object/platforms/selenium_webdriver/page_object.rb:478:in `click_button_for'
from /home/tivaravko/.rvm/gems/ruby-1.9.3-p125@webdriver/gems/page-object-0.6.3/lib/page-object/accessors.rb:407:in `block in button'
from testap.rb:24:in `

'
``

Button found If using the original selenium-webdriver:
```ruby
browser = Selenium::WebDriver.for :ff
begin
browser.get "data:text/html;content-type=utf-8,#{URI.escape DATA.read}"
element = browser.find_element(:css => "input[type='submit']")
element.click
ensure
browser.quit
end
```