Created
February 23, 2016 03:45
-
-
Save tourdedave/37abed1c3c5410db14d9 to your computer and use it in GitHub Desktop.
This file contains 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 | |
driver = Selenium::WebDriver.for :firefox | |
driver.get 'http://the-internet.herokuapp.com/exit_intent' | |
driver.action.move_by(5000, 0).perform | |
Selenium::WebDriver::Wait.new(timeout: 5).until { | |
driver.find_element(class: 'modal-body').displayed? | |
} | |
expect(driver.find_element(class: 'modal-body').displayed?).to eql true | |
driver.quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment