I need some help with watir-webdriver and rspec. To generate the report on basis of the test pass or fail. I created this file and run the command in the CMD rspec rspec test6.rb -fh -reporttest6.html
I got list of error. One of them text_field is the undefined method. Other are it can not initiate the watir and rspec auto test suite Any help :) require 'rubygems' require 'watir-webdriver' describe 'MySite' do before(:all) { @browser = Watir::Browser.new :firefox } it 'contains "Google"' do @browser.goto 'http://google.com/' @browser.text.should include 'google' end @browser.text_field(:xpath,"/html/body/div[@id='searchform']/ form[@id='tsf']/div/div[2]/table/tbody/tr[1]/td[1]/table/tbody/tr/ td[1]/div/table[@id='sftab']/tbody/tr/td[@id='lst-xbtn']/div/div[2]/ input").set ("ruby") @browser.button(:xpath,"/html/body/div[@id='searchform']/ form[@id='tsf']/div/div[3]/center/input[1]").click it 'contains "Ruby"' do @browser.text.should_not include 'Rails' end after(:all) { @browser.quit } end -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com