<commit_before># Include the needed gems
require 'rubygems'  
require 'appium_lib'  

# Configure call to Appium Server
desired_caps = {  
   caps:  {  
    platformName: 'iOS',  
    platformVersion: '8.1',  
    deviceName: 'iPhone 5s',  
    browserName: 'Safari',  
   }  
  } 

# Create a new Appium driver
@driver = Appium::Driver.new(desired_caps).start_driver 

# Promote appium method to class instance methods
Appium.promote_appium_methods Object  

# Open web page
# Note apple.com open first unless you override it in caps using safariInitialUrl
@driver.get("http://www.google.com/")  

# Extra time to allow webpage to load
sleep(5)

# Find Search Box element, click on it, type in Search Query 
element = @driver.find_element(:id, 'lst-ib')
element.click
element.send_keys '<NAME>'
# Extra pause for demostration
sleep(2)

# Find Search Button element, click on it
element = @driver.find_element(:id, 'tsbb')
element.click

# Extra time to allow webpage to load
sleep (5)

# Properly close down the driver
driver_quit

# Print test pass success message
puts "Tests Succeeded"<commit_msg>Updated with Appium/Selenium description<commit_after># Include the needed gems
require 'rubygems'  
require 'appium_lib'  

# Configure call to Appium Server
desired_caps = {  
   caps:  {  
    platformName: 'iOS',  
    platformVersion: '8.1',  
    deviceName: 'iPhone 5s',  
    browserName: 'Safari',  
   }  
  } 

# Create a new Appium specific driver with helpers availabe
@appium_driver = Appium::Driver.new(desired_caps)

# Standard Selenium driver without any Appium methods.
# Need to convert to Selenium driver to make "get" call
# since Appium doesn't support "get" method.
@selenium_driver = @appium_driver.start_driver

# Promote appium method to class instance methods
# Without promoting we would need to make all calls with the @appium_driver, example:
#   @appium_driver.find_element(:id, 'lst-ib')
# After promoting to a class instance method we can the method directly, example:
#   find_element(:id, 'lst-ib')
Appium.promote_appium_methods Object

# Open web page
# Note apple.com open first unless you override it in caps using safariInitialUrl
@selenium_driver.get("http://www.google.com/")

# Extra time to allow webpage to load
sleep(5)

# Find Search Box element, click on it, type in Search Query 
element = find_element(:id, 'lst-ib')
element.click
element.send_keys '<NAME>'
# Extra pause for demostration
sleep(2)

# Find Search Button element, click on it
element = find_element(:id, 'tsbb')
element.click

# Extra time to allow webpage to load
sleep (5)

# Properly close down the driver
driver_quit

# Print test pass success message
puts "Tests Succeeded"
{'fraction_non_alphanumeric': 0.08874860750092833, 'fraction_numerical': 0.004455997029335313, 'mean_word_length': 4.292730844793713, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4025394', 'n_tokens_mistral': 868, 'n_tokens_neox': 838, 'n_words': 303}