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
Error: DomMessenger is not defined | |
Source File: chrome://fxdriver/content/server.js | |
Line: 36 | |
============= | |
Supported interfaces: nsIException, nsIXPCException, nsIClassInfo, nsISupports, |
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
class WebDriver::Remote::Bridge | |
command :addCookie, :post, "session/:session_id/:context/cookie" | |
command :goBack, :post, "session/:session_id/:context/back" | |
command :clearElement, :post, "session/:session_id/:context/element/:id/clear" | |
command :clickElement, :post, "session/:session_id/:context/element/:id/click" | |
command :close, :delete, "session/:session_id/:context/window" | |
command :getCurrentUrl, :get, "session/:session_id/:context/url" | |
command :deleteAllCookies, :delete, "session/:session_id/:context/cookie" | |
command :deleteCookie, :delete, "session/:session_id/:context/cookie/:name" | |
command :dragElement, :post, "session/:session_id/:context/element/:id/drag" |
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
MAX_THREADS = 4 | |
threads = [] | |
MAX_THREADS.times do | |
threads << Thread.new do | |
browser = Celerity::Browser.new | |
browser.goto "..." | |
# etc. |
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
$ jruby --version | |
jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java] | |
$ time jruby -S rake spec | |
(in /Users/jarib/src/git/celerity) | |
.......[2009-10-27 13:33:01] INFO WEBrick 1.3.1 | |
[2009-10-27 13:33:01] INFO ruby 1.8.6 (2009-06-15) [java] | |
[2009-10-27 13:33:01] INFO WEBrick::HTTPProxyServer#start: pid=11413 port=2001 | |
127.0.0.1 - - [27/Oct/2009:13:33:01 CET] "GET http://0.0.0.0:2000/ HTTP/1.1" 200 17 | |
- -> http://0.0.0.0:2000/ | |
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
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
The format of the args argument is that it is an array containing, in the order passed to the function, wrapped arguments. The form of wrapped arguments is: | |
wrap("string") = {"type": "STRING", value: "string"} | |
wrap(true) = {"type": "BOOLEAN", value: true} | |
wrap(7) = {"type": "NUMBER", value: 7} | |
wrap(7.1) = {"type": "NUMBER", value: 7.1} |
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
class Radio < Element | |
identifier :tag_name => 'input', :type => 'radio' | |
method_name :radio | |
collection_method_name :radios | |
# core | |
attributes :class, :id, :style, :title, | |
# i18n | |
:dir, :lang, |
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
<li class="chassi"> | |
<span class="image"> | |
<a style="cursor: pointer" onclick="dcsMultiTrack('DCS.dcsuri','/finn/motor/browse1/Cabriolet','WT.ti','FINN motor browse1 karosseritype: Cabriolet'); return true;" href="/finn/car/used/result?BODY_TYPE=7" rel="nofollow"> | |
<img border="0" src="http://devcache.finn.no/img/motor/chassi/7.png" alt="Velg karosseri"/> | |
</span> | |
<span class="text"> | |
Cabriolet | |
<br> | |
(699) | |
</a> |
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" | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to "http://google.com" | |
element = driver.find_element(:name, 'q') | |
element.send_keys "Hello WebDriver!" | |
element.submit | |
puts driver.title |
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
import com.gargoylesoftware.htmlunit.WebClient; | |
import com.gargoylesoftware.htmlunit.html.HtmlPage; | |
import com.gargoylesoftware.htmlunit.html.HtmlElement; | |
import com.gargoylesoftware.htmlunit.html.HtmlPasswordInput; | |
public class FailingPasswordField { | |
public static void main(String[] args) throws Exception { | |
WebClient wc = new WebClient(); | |
HtmlPage page = wc.getPage("file:///tmp/form.html"); |
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
# Visit the www.guardian.co.uk front page, and get the text of the body element 5 times. | |
# Time spent launching the browser and loading the page is not counted. | |
Rehearsal -------------------------------------------- | |
chrome: 0.010000 0.010000 0.020000 ( 9.701344) | |
firefox: 0.070000 0.160000 107.700000 (128.759095) | |
--------------------------------- total: 107.720000sec | |
user system total real | |
chrome: 0.020000 0.020000 0.040000 ( 9.041230) |