title: Ruby, Cucumber and Watir Automation Scripting Basics
body: <p>Thank y'all all within the community and the moderators for being so cool and willing to help so quickly! Just wanted to lead in with that. So I could really use some help with this basic automation script that I am running. I am trying to select the search bar on Google.com and enter some text. I have gotten some help from friends but they were stuck as well. But it learning this I was hoping to get some help from the experts and just ask these questions that I have because Google ain't got shit! </p>
  
  <p>1) How to select the search field and enter text. </p>
  
  <p>Mine looks something like this I've tried xpath, different values, id's classes.</p>
  
  <pre><code>require 'ruby' 
  require 'watir-webdriver'
  
  browser = Browser::browser.new :firefox 
  browser.goto 'http://google.com'
  browser.text_field(:value =&gt; 'Search').set('google search')
  </code></pre>
  
  <p>2) When I inspect the element and find unique characteristics to that value (i.e. href, id, title, class, name), which are the ones that I can actually utilize to call either the button, text_field, or link?</p>
  
  <p>3) I understand html and css pretty well. Can someone please explain how to properly utilize xpath?</p>
  
  <p>Y'all rock, I feel like there are tons of people out there who have these same questions as I do, and can't find the damn answers anywhere, so I ask all of you automation experts, would you mind dropping a knowledge bomb and learnin us?</p>