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
drwxr-xr-x@ 63 tourdedave staff 2.1K Oct 10 16:17 .. | |
-rw-r--r-- 1 tourdedave staff 178B Nov 15 13:21 Bookmarks.plist | |
-rw-r--r--@ 1 tourdedave staff 47K Oct 27 16:19 Configurations.plist.signed | |
drwxr-xr-x 4 tourdedave staff 136B Nov 14 13:28 Databases | |
-rw-r--r--@ 1 tourdedave staff 3.5K Mar 17 2014 Downloads.plist | |
drwxr-xr-x 4 tourdedave staff 136B Nov 19 11:38 Extensions | |
-rw-r--r--@ 1 tourdedave staff 11K Nov 19 11:15 History.plist | |
-rw-r--r--@ 1 tourdedave staff 116K Nov 19 11:15 HistoryIndex.sk | |
-rw-r--r--@ 1 tourdedave staff 1.2K Nov 19 11:15 LastSession.plist | |
drwxr-xr-x 6 tourdedave staff 204B Nov 14 13:00 LocalStorage |
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.internet_explorer | |
caps.version = '8' | |
caps.platform = 'Windows XP' | |
@driver = Selenium::WebDriver.for( | |
:remote, |
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
# pages/top-nav-widget.rb | |
module PageObject | |
module TopNavWidget | |
FORK_LINK = { css: 'img' } | |
end | |
end | |
# pages/login-page.rb | |
module PageObject | |
class LoginPage |
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
source 'https://rubygems.org' | |
gem 'selenium-webdriver', '~> 2.45.0' | |
gem 'eyes_selenium', '~> 2.15.0' | |
gem 'rspec', '~> 3.2.0' | |
gem 'rake', '~> 10.4.2' |
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
source 'https://rubygems.org' | |
gem 'selenium-webdriver', '~> 2.46.0' |
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' | |
@driver1 = Selenium::WebDriver.for :firefox | |
@driver2 = Selenium::WebDriver.for :firefox | |
@driver1.get 'http://google.com' | |
@driver2.get 'http://duckduckgo.com/' | |
@driver1.quit | |
@driver2.quit |
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
class BasePage | |
def initialize(driver) | |
@driver = driver | |
driver.get ENV['base_url'] | |
end | |
def visit(url_path) | |
driver.get ENV['base_url'] + url_path | |
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
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? |
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 | |
require 'eyes_selenium' | |
def setup | |
@eyes = Applitools::Eyes.new | |
@eyes.api_key = ENV['APPLITOOLS_API_KEY'] | |
caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer | |
caps.version = '8' |
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
test.afterEach(function() { | |
var testName = this.currentTest.fullTitle(), | |
testResult = (this.currentTest.state === 'passed') ? true : false; | |
driver.executeScript('sauce:job-name=' + testName); | |
driver.executeScript('sauce:job-result=' + testResult); | |
driver.quit(); | |
}); |