I am attempting to properly install and run a Ruby script.
I have not worked in Ruby for some time and am not sure what I'm missing; it worked perfectly in the past (on a work machine.)
I am receiving the following error message:
<Main> undefined local variable or method ''watir'' for main: Object <NameError>
I have reserached this, but am unable to determine what is causing this error.
Version: ruby 2.2.6p396
Script:
`
require ‘watir’
require ‘watir-webdriver’
Watir::Browser.default = “firefox”
browser = Watir::Browser.start "https://www.website.com"
browser.link(:text, "Register").click
browser.button(:value,"I Agree").click
browser.button(:value,"I Agree").click
browser.text_field(:id, "username").set("bbb")
browser.text_field(:id, "password").set("bbb")
browser.text_field(:id, "password2").set("ccc")
browser.text_field(:id, "email").set("hhh")
browser.text_field(:id, "email2").set("yyy")
browser.checkbox(:name, "imagestring").set
browser.checkbox(:id, "emailpmnotify").set
browser.checkbox(:id, "invisible").set
browser.select_list(:id, "subscriptionmethod").select("No email notification")
browser.select_list(:id, "timezoneoffset").select("GMT -3:30 (06:27 PM)")
browser.select_list(:name, "dstcorrection").select("Never use DST correction")
browser.select_list(:id, "language").select("English (American)")
browser.button(:value,"Submit Registration!").click
`
Thank you in advance