Hi,

I'm new to Watir, but I really want to learn.

Currently I'm running on windows with following config:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
  - RUBY EXECUTABLE: c:/ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: c:/ruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-60
+ following:
commonwatir (1.6.7)
cucumber (0.9.4)
firewatir (1.6.7)
watir (1.6.7)

When I execute example script and I'm not logged in everything works
fine.
When I'm logged in execution fails.

Script:
require 'rspec'
require 'watir'

test_site = "http://google.com";

Watir::Browser.default = 'firefox'
browser = Watir::Browser.new

Given /^I am on the Google search page using FF$/ do
  browser.goto test_site
end

When /^I search for "(.*)"$/ do |query|
  browser.text_field(:name, "q").set(query)
  browser.button(:name, "btnG").click
end

Then /^I should see "(.*)"$/ do |text|
  browser.text.should include(text)
end

Failure:
    Then I should see "daily news"
        # features/step_definitions/google_search_ff.rb:27 expected
        "Screen reader users, click here to turn off Google
Instant.if(google.j.b)document.body.style.visibility='hidden';Googledaily
\302\240news \303\227Advanced searchLanguage toolsInstant is onInstant
is offInstant is off (slow connection) \342\226\274Google Instant is
off due to connection speed. Learn more.
\342\200\272 On (type to search)\342\200\272 Off (press Enter to
search)More about Google InstantGoogle Instant is unavailable. Press
Enter to search. Learn moreGoogle Instant is off due to connection
speed. Press Enter to search.Press Enter to search.Press Enter to
search.Web Images Videos Maps News Shopping Gmail more
\342\226\274Books Finance Translate Scholar Blogs Updates YouTube
Calendar Photos Documents Reader Sites Groups even more \302\273
[email protected] | iGoogle | Settings \342\226\274 | Sign
outSearch settings Google Account settings Advertising
\302\240ProgramsBusiness SolutionsAbout GoogleGo to Google Sverige
\302\251 2010 - Privacy  function _gjp() {!(location.hash && _gjuc())
&& setTimeout(_gjp, 500);}google.j[1]={cc:[],co:
['ghead','body','footer','xjsi'],pc:
[],css:document.getElementById('gstyle').innerHTML,main:'<div
id=ghead></div>' +'<span class=ctr-p id=body></span>' +'<span
class=ctr-p id=footer></span>' +'<span id=xjsi></span>'};function
wgjp(){var xjs=document.createElement('script');xjs.src='/
extern_chrome/3f2d83e828bdfbc.js';(document.getElementById('xjsd') ||
document.body).appendChild(xjs)};if(google.y)google.y.first=[];google.dlj=function(b)
{window.setTimeout(function(){vara=document.createElement(\"script
\");a.src=b;document.getElementById(\"xjsd\").appendChild(a)},0)};
\nif(google.y)google.y.first=[];

and a lot more of text like this. Exen though in the browser I see
correct result for my search.
I'm somehow in dead end so if you could push me a bit forward I would
be grateful.
As always I know that I'm missing something but I cannot figure out
what it is.

BR
Avg

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to