Skip to content

Instantly share code, notes, and snippets.

View santiycr's full-sized avatar
💭
Always learning

Santiago Suarez Ordoñez santiycr

💭
Always learning
View GitHub Profile
17:42:01.900 INFO [10] org.openqa.selenium.server.SeleniumServer - Writing debug logs to c:\log\selenium-server-interactive.log
17:42:01.906 INFO [10] org.openqa.selenium.server.SeleniumServer - Java: Sun Microsystems Inc. 17.0-b17
17:42:01.907 INFO [10] org.openqa.selenium.server.SeleniumServer - OS: Windows Server 2008 6.0 x86
17:42:01.915 INFO [10] org.openqa.selenium.server.SeleniumServer - v2.0 [a7], with Core v2.0 [a7]
17:42:01.975 DEBUG [10] org.openqa.jetty.util.Container - add component: SocketListener0@0.0.0.0:4443
17:42:02.015 DEBUG [10] org.openqa.jetty.util.Container - add component: org.openqa.jetty.http.ResourceCache@bf32c
17:42:03.090 DEBUG [10] org.openqa.jetty.util.Container - add component: org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
17:42:03.094 DEBUG [10] org.openqa.jetty.util.Container - add component: HttpContext[/,/]
17:42:03.096 DEBUG [10] org.openqa.jetty.http.HttpServer - Added HttpContext[/,/] for host *
driver.get("http://twitter.com");
WebElement tweet = driver.findElement(By.xpath("//textarea"));
tweet.sendKeys("#SeleniumConf is awesome!");
driver.findElement(By.linkText("Tweet")).click();
driver.get("http://twitter.com");
driver.findElement(By.xpath("//textarea")).sendKeys("#seleniumconf is awesome");
driver.findElement(By.linkText("Tweet")).click();
@santiycr
santiycr / Tweet.java
Created March 11, 2011 23:15
Tweet about #SeleniumConf!
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.util.concurrent.TimeUnit;
public class Tweet {
public static void goTweet() throws Exception {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.get("http://twitter.com");
require "test/unit"
require "rubygems"
gem "selenium-client"
require "selenium/client"
class test < Test::Unit::TestCase
def setup
@verification_errors = []
@selenium = Selenium::Client::Driver.new \
require 'rubygems'
require "watir-webdriver"
username = "username"
access_key = "access-key"
#caps = Selenium::WebDriver::Remote::Capabilities.iexplore
#caps.version = "8"
#caps.platform = "WINDOWS"
#
require 'rubygems'
require "watir-webdriver"
username = "username"
access_key = "access-key"
caps = {:platform => "WINDOWS", :version => "8", :browserName => "internet explorer"}
#caps = {:platform => "WINDOWS", :browserName => "google #chrome"}
#caps = {:platform => "WINDOWS", :version => "3.0", :browserName => "firefox"}
#caps = {:platform => "WINDOWS", :version => "3.6", :browserName => "internet explorer"}
require 'rubygems'
require "watir-webdriver"
username = "sso"
access_key = ENV['KEY']
# caps = {:platform => "WINDOWS", :version => "6", :browserName => "internet explorer", :name => "Watir in the cloud"}
# caps = {:platform => "WINDOWS", :version => "7", :browserName => "internet explorer", :name => "Watir in the cloud"}
# caps = {:platform => "WINDOWS", :version => "8", :browserName => "internet explorer", :name => "Watir in the cloud"}
caps = {:platform => "VISTA", :version => "9", :browserName => "internet explorer", :name => "Watir in the cloud"}
require 'rubygems'
require "watir-webdriver"
username = ENV['SAUCE_USER']
access_key = ENV['SAUCE_KEY']
# caps = {:platform => "WINDOWS", :version => "3.0", :browserName => "firefox", :name => "Watir in the cloud"}
# caps = {:platform => "WINDOWS", :version => "3.6", :browserName => "firefox", :name => "Watir in the cloud"}
# caps = {:platform => "VISTA", :version => "4", :browserName => "firefox", :name => "Watir in the cloud"}
# caps = {:platform => "WINDOWS", :version => "6", :browserName => "internet explorer", :name => "Watir in the cloud"}
{"Windows 2003_firefox_3.0.": {"Absolute content CSS": 0.046000003814697266, "Absolute ID XPATH": 0.046999931335449219, "Absolute name XPATH": 0.046999931335449219, "Relative name XPATH": 0.046999931335449219, "Absolute ID CSS": 0.04700016975402832, "Absolute class CSS": 0.032000064849853516, "Relative content CSS": 0.21899986267089844, "Absolute content XPATH": 0.032000064849853516, "Relative name CSS": 0.04700016975402832, "Relative class CSS": 0.046999931335449219, "Absolute name CSS": 0.030999898910522461, "Relative class XPATH": 0.032000064849853516, "Relative ID XPATH": 0.046999931335449219, "Relative ID CSS": 0.04700016975402832, "Absolute class XPATH": 0.032000064849853516, "Relative content XPATH": 0.046999931335449219}, "Windows 2003_firefox_2.": {"Absolute content CSS": 0.062000036239624023, "Absolute ID XPATH": 0.046000003814697266, "Absolute name XPATH": 0.046999931335449219, "Relative name XPATH": 0.078000068664550781, "Absolute ID CSS": 0.062000036239624023, "Absolute class CSS": 0.062000036239