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
I've heard people needing help with figuring out how to replace xpath with css_selectors. Here's some javascript that helps you build cssSelectors. Copy/paste this javascript into your browser address bar to see a cool cssbuilder. Bookmark it onto your bookmarks toolbar for quick and easy access. | |
javascript:(function(){var%20s=document.createElement('div');s.innerHTML='Loading...';s.style.color='black';s.style.padding='20px';s.style.position='fixed';s.style.zIndex='9999';s.style.fontSize='3.0em';s.style.border='2px%20solid%20black';s.style.right='40px';s.style.top='40px';s.setAttribute('class','selector_gadget_loading');s.style.background='white';document.body.appendChild(s);s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('src','http://www.selectorgadget.com/stable/lib/selectorgadget.js?raw=true');document.body.appendChild(s);})(); | |
--Harv |
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 'rubygems' | |
require 'watir-webdriver' # gem install watir-webdriver | |
require 'rspec' # gem install rspec | |
class BrowserContainer | |
attr_reader :browser | |
def initialize(browser) | |
@browser = browser | |
end |
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 'rubygems' | |
require 'selenium/webdriver' | |
require 'selenium/webdriver/remote' | |
require "watir-webdriver" | |
username = ENV['SAUCE_USERNAME'] | |
access_key = ENV['SAUCE_ACCESS_KEY'] | |
capabilities = { | |
:name => "Watir in the cloud!" |
NewerOlder