<commit_before>

#-------------------------------------------------------------------------------------------------------------#
# demo test for the WATIR controller                                           
#                                                                              
#  Simple Google test written by <NAME>   10/10/04                      
# Purpose: to demonstrate the following WATIR functionality:                   
#   * entering text into a text field                                          
#   * clicking a button
#   * checking to see if a page contains text.                                 
# Test will search Google for the "pickaxe" Ruby book
#
#------------------------------------------------------------------------------------------------------------#

   #includes:
   require 'watir'   # the watir controller

   #variables:
   testSite = 'http://www.google.com'
  
   #open the IE browser
   $ie = IE.new

   puts "## Beginning of test: Google search"
   puts "  "
  
   puts "Step 1: go to the test site: " + testSite
   $ie.goto(testSite)
   puts "  Action: entered " + testSite + "in the address bar."

   puts "Step 2: enter 'pickaxe' in the search text field"
   $ie.textField(:name, "q").set("pickaxe")       # q is the name of the search field
   puts "  Action: entered pickaxe in the search field"

   puts "Step 3: click the 'Google Search' button"
   $ie.button(:name, "btnG").click   # "btnG" is the name of the Search button
   puts "  Action: clicked the Google Search button."

   puts "Expected Result: "
   puts " - a Google page with results should be shown. 'Pragmatic Programmers LLC' should be high on the list."
  
   puts "Actual Result: Check that the 'Programming Ruby, 2nd Ed.' link appears on the results page "
   a = $ie.pageContainsText("Programming Ruby") 
   if !a 
      puts "Test Failed! Could not find: 'The Pragmatic Programmers, LLC'" 
   else
      puts "Test Passed. Found the test string: 'Programming Ruby, 2nd Ed.'. Actual Results match Expected Results."
   end
   
   puts "  "
   puts "## End of test: Google search"
  

# -end of simple Google search test

<commit_msg>changed Search button attribute, search string. Prag Prog no longer showing up on Search page, now Programming Ruby<commit_after>

#-------------------------------------------------------------------------------------------------------------#
# demo test for the WATIR controller                                           
#                                                                              
#  Simple Google test written by <NAME>   10/10/04                      
# Purpose: to demonstrate the following WATIR functionality:                   
#   * entering text into a text field                                          
#   * clicking a button
#   * checking to see if a page contains text.                                 
# Test will search Google for the "pickaxe" Ruby book
#
#------------------------------------------------------------------------------------------------------------#

   #includes:
   require 'watir'   # the watir controller

   #variables:
   testSite = 'http://www.google.com'
  
   #open the IE browser
   $ie = IE.new

   puts "## Beginning of test: Google search"
   puts "  "
  
   puts "Step 1: go to the test site: " + testSite
   $ie.goto(testSite)
   puts "  Action: entered " + testSite + "in the address bar."

   puts "Step 2: enter 'pickaxe' in the search text field"
   $ie.textField(:name, "q").set("pickaxe")       # q is the name of the search field
   puts "  Action: entered pickaxe in the search field"

   puts "Step 3: click the 'Google Search' button"
   $ie.button(:name, "btnG").click   # "btnG" is the name of the Search button
   puts "  Action: clicked the Google Search button."

   puts "Expected Result: "
   puts " - a Google page with results should be shown. 'Programming Ruby' should be high on the list."
  
   puts "Actual Result: Check that the 'Programming Ruby' link appears on the results page "
   a = $ie.pageContainsText("Programming Ruby") 
   if !a 
      puts "Test Failed! Could not find: 'Programming Ruby'" 
   else
      puts "Test Passed. Found the test string: 'Programming Ruby'. Actual Results match Expected Results."
   end
   
   puts "  "
   puts "## End of test: Google search"
  

# -end of simple Google search test


{'fraction_non_alphanumeric': 0.17393289203378223, 'fraction_numerical': 0.004565167769915545, 'mean_word_length': 1.4673423423423424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4987412', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1092, 'n_words': 456}