title: Using Watir I can't get a test to verify text in a username field
body: <p>I will first forewarn I am brand new to Watir &amp; Ruby and i'm kind of flying by the seat of my pants with use of google to figure things out. </p>
  
  <p>So my issue is that I am going to a site for work and entering a username and password.  After that I am trying to ideally verify the username and password are there and entered correctly.  Now the password is being hidden so I thought id handle that once i'm more advanced but the username field no matter what i've tried I always get a failing test "browser.text.include?" seems like it should work and I have tried different kinds of waits &amp; pauses and that doesn't seem to be the issue.</p>
  
  <p>I have watched the test run a few times and it doesn't seem like a pausing issue of any sort. Now I am trying to view an input inside of a Div so I wasn't sure if that could be why it's failing. </p>
  
  <p>Lastly most of the resources i've found for watir and ruby tutorials seem rather old and many of the early examples don't work.  If there are any recommendations from users that would be greatly appreciated.</p>
  
  <pre><code>#require needed gems for the test case
  require 'rubygems'
  require 'watir-webdriver'
  require 'rspec'
  require "watir-webdriver/wait"
  
  #Open a browswer and wait 60 seconds
  browser = Watir::Browser.new :ie
  browser.driver.manage.timeouts.implicit_wait = 60 #60 seconds
  
  #Enter a Username
  browser.text_field(:id =&gt; 'username').when_present.set("superuser")
  
  #Enter a Password
  browser.text_field(:id =&gt; 'password').when_present.set("password")
  
  #If username of superuser is not found display the test passes.  If  username of superuser is found then the test failed
  puts " Actual Results:"
  browser.text_field(text: 'superuser').wait_until_present
  if browser.text.include? 'superuser'
  puts " Test Passed! Username &amp; Password have not been cleared since the user has never clicked the clear button Actual Results match Expected Results. "
  else
  puts " Test Failed! Username has been cleared even though the clear button was never pressed. "
  end
  </code></pre>