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 'java' | |
require 'jsch-0.1.38.jar' | |
class SSH | |
include_package "com.jcraft.jsch" | |
def initialize(host, username, password) | |
@client = JSch.new | |
@session = @client.getSession(username, host, 22) | |
@session.setPassword(password) |
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 "test/unit" | |
class Foo < Test::Unit::TestCase | |
0.upto(10) do |n| | |
define_method("test_#{n}") do | |
assert_equal(n, @data[n]) | |
end | |
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
module Celerity | |
class Browser | |
class << self | |
# Added for Watir compatability - not in use by Celerity | |
attr_accessor :speed, :attach_timeout, :visible | |
# Added for Watir compatability - not in use by Celerity | |
alias_method :start_window, :start | |
# Added for Watir compatability - not in use by Celerity | |
def reset_attach_timeout; @attach_timeout = 2.0; end | |
# Added for Watir compatability - not in use by Celerity |
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
package foo; | |
public interface InterfaceA { | |
void 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
Index: commonwatir/unittests/dl_test.rb | |
=================================================================== | |
--- commonwatir/unittests/dl_test.rb (revision 0) | |
+++ commonwatir/unittests/dl_test.rb (revision 0) | |
@@ -0,0 +1,66 @@ | |
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED | |
+require 'unittests/setup' | |
+ | |
+class TC_Dl < Test::Unit::TestCase | |
+ include Watir::Exception |
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
Image#fileCreatedDate => file_created_date | |
Image#fileSize => file_size | |
Image#hasLoaded? => loaded? | |
SelectList#getAllContents => options | |
SelectList#getSelectedItems => selected_options | |
SelectList#clearSelection => clear_selection | |
SelectList#includes? => include? | |
TextField#dragContentsTo => drag_contents_to | |
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 challenge is fairly simple: given a file containing one word per line, print out all the combinations of words that are anagrams; each line in the output contains all the words from the input that are anagrams of each other. For example, your program might include in its output: | |
kinship pinkish | |
enlist inlets listen silent | |
boaster boaters borates | |
fresher refresh | |
sinks skins | |
knits stink | |
rots sort |
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
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>jquery test</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
(function ($) { | |
function init(){ | |
$(".editLink").click(function(event){ | |
var scriptTag = "<scri" + "pt> function update() { return 0; } </s" + "cript>"; |
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
it "evaluates <script> tags injected in the DOM through JQuery's replaceWith() - fixed in rev. 3598" do | |
@browser.goto(HTML_DIR + "/jquery.html") | |
@browser.link(:class, 'editLink').click | |
@browser.div(:id, 'content').text.should == "typeof update: function" | |
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
From f0072dc3828f55f9afae38bd1d0ca07ad4f60947 Mon Sep 17 00:00:00 2001 | |
From: jarib <[email protected]> | |
Date: Sun, 22 Feb 2009 13:28:26 +0100 | |
Subject: [PATCH] Add support for <em> elements (Watir) | |
--- | |
watir/lib/watir/collections.rb | 6 ++++++ | |
watir/lib/watir/non_control_elements.rb | 3 +++ | |
2 files changed, 9 insertions(+), 0 deletions(-) | |
OlderNewer