Skip to content

Instantly share code, notes, and snippets.

@airbr
Created January 13, 2023 07:41
Show Gist options
  • Save airbr/4b3659da3792eb186e73a0e942df5ee5 to your computer and use it in GitHub Desktop.
Save airbr/4b3659da3792eb186e73a0e942df5ee5 to your computer and use it in GitHub Desktop.
# Create a Test Suite for MorganWebDev.com
require 'test/unit'
require 'rubygems'
require 'selenium-webdriver'
class TestMorganWebDev < Test::Unit::TestCase
def setup
@driver = Selenium::WebDriver.for :firefox
@base_url = "http://www.morganwebdev.com/"
@driver.manage.timeouts.implicit_wait = 30
@verification_errors = []
end
def teardown
@driver.quit
assert_equal [], @verification_errors
end
def test_morganwebdev
@driver.get(@base_url + "/")
@driver.find_element(:class, 'CTA-button').click
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment