This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' # Add to gemfile if not already there | |
# Not a functioning test | |
# Also not the greatest example | |
def run | |
setup | |
yield | |
teardown | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run | |
setup | |
yield | |
teardown | |
end | |
run do | |
@driver.get 'http://www.kenst.com/about' | |
expect(@driver.title).to eql "About โ Chris Kenst's Blog" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'selenium-webdriver' | |
require 'rspec/expectations' | |
include RSpec::Matchers | |
def setup | |
caps = Selenium::WebDriver::Remote::Capabilities.send("chrome") | |
# This url is the local access url of the docker container | |
@driver = Selenium::WebDriver.for(:remote, url: "http://0.0.0.0:4444/wd/hub", desired_capabilities: caps) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('My Login application', () => { | |
it('Should login with valid credentials', () =>{ | |
cy.visit(`https://the-internet.herokuapp.com/login`); | |
cy.get('#username') | |
.type('tomsmith') | |
cy.get('#password') | |
.type('SuperSecretPassword!') |
OlderNewer