Changeset 19603 for lang/ruby

Show
Ignore:
Timestamp:
09/19/08 17:12:23 (2 months ago)
Author:
yugui
Message:

added get_element method to selenium drivers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/selenium_rc_spec/lib/spec/selenium_rc/example/selenium_driver_extension.rb

    r19191 r19603  
    4343 
    4444          def have_element?(xpath) 
     45            !get_element(xpath).empty? 
     46          end 
     47          def get_element(xpath) 
    4548            html = get_html_source 
    46             !(Hpricot(html) / xpath).empty? 
     49            @last_return_value = Hpricot(html) / xpath 
    4750          end 
    4851        end