firewatir 1.6.2 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +32 -0
- data/lib/firewatir.rb +40 -50
- data/lib/firewatir/container.rb +491 -534
- data/lib/firewatir/document.rb +239 -0
- data/lib/firewatir/element.rb +1365 -0
- data/lib/firewatir/element_collections.rb +314 -0
- data/lib/firewatir/elements/button.rb +15 -0
- data/lib/firewatir/elements/file_field.rb +29 -0
- data/lib/firewatir/elements/form.rb +40 -0
- data/lib/firewatir/elements/frame.rb +55 -0
- data/lib/firewatir/elements/hidden.rb +56 -0
- data/lib/firewatir/elements/image.rb +139 -0
- data/lib/firewatir/elements/input_element.rb +44 -0
- data/lib/firewatir/elements/link.rb +76 -0
- data/lib/firewatir/elements/non_control_element.rb +53 -0
- data/lib/firewatir/elements/non_control_elements.rb +108 -0
- data/lib/firewatir/elements/not_used.rb +278 -0
- data/lib/firewatir/elements/option.rb +131 -0
- data/lib/firewatir/elements/radio_check_common.rb +163 -0
- data/lib/firewatir/elements/select_list.rb +188 -0
- data/lib/firewatir/elements/table.rb +218 -0
- data/lib/firewatir/elements/table_cell.rb +54 -0
- data/lib/firewatir/elements/table_row.rb +100 -0
- data/lib/firewatir/elements/text_field.rb +218 -0
- data/lib/firewatir/exceptions.rb +10 -10
- data/lib/firewatir/firefox.rb +1040 -1127
- data/lib/firewatir/jssh_socket.rb +101 -0
- data/lib/firewatir/version.rb +5 -5
- data/unittests/attach_to_new_window_test.rb +49 -42
- data/unittests/bug_fixes_test.rb +195 -198
- data/unittests/buttons_xpath_test.rb +88 -88
- data/unittests/checkbox_test.rb +158 -155
- data/unittests/checkbox_xpath_test.rb +107 -107
- data/unittests/div_test.rb +275 -276
- data/unittests/filefield_test.rb +49 -45
- data/unittests/filefield_xpath_test.rb +35 -35
- data/unittests/form_test.rb +296 -308
- data/unittests/frame_test.rb +159 -152
- data/unittests/hidden_test.rb +85 -85
- data/unittests/hidden_xpath_test.rb +72 -72
- data/unittests/html/blankpage.html +11 -11
- data/unittests/html/buttons1.html +61 -61
- data/unittests/html/cssTest.html +42 -42
- data/unittests/html/div.html +72 -72
- data/unittests/html/fileupload.html +45 -45
- data/unittests/html/formTest1.html +38 -38
- data/unittests/html/forms2.html +45 -45
- data/unittests/html/frame_buttons.html +3 -3
- data/unittests/html/iframeTest.html +14 -14
- data/unittests/html/iframeTest1.html +13 -13
- data/unittests/html/iframeTest2.html +5 -5
- data/unittests/html/links1.html +42 -42
- data/unittests/html/nestedFrames.html +6 -6
- data/unittests/html/new_browser.html +1 -0
- data/unittests/html/new_browser_popup.html +8 -0
- data/unittests/html/pass.html +9 -9
- data/unittests/html/pre.html +27 -27
- data/unittests/html/redirect.html +10 -10
- data/unittests/html/redirect1.html +8 -8
- data/unittests/html/redirect2.html +8 -8
- data/unittests/html/redirect3.html +8 -8
- data/unittests/html/simple_table_columns.html +74 -74
- data/unittests/html/table1.html +165 -165
- data/unittests/html/textfields1.html +62 -62
- data/unittests/images_test.rb +198 -205
- data/unittests/images_xpath_test.rb +118 -119
- data/unittests/javascript_test.rb +75 -75
- data/unittests/links_test.rb +231 -232
- data/unittests/links_xpath_test.rb +79 -79
- data/unittests/mozilla_all_tests.rb +7 -7
- data/unittests/pre_test.rb +75 -76
- data/unittests/radios_xpath_test.rb +101 -101
- data/unittests/redirect_test.rb +41 -41
- data/unittests/selectbox_test.rb +142 -142
- data/unittests/selectbox_xpath_test.rb +129 -129
- data/unittests/setup.rb +29 -30
- data/unittests/table_test.rb +385 -373
- data/unittests/table_xpath_test.rb +185 -185
- data/unittests/textfields_test.rb +234 -233
- data/unittests/textfields_xpath_test.rb +113 -113
- metadata +33 -11
- data/lib/firewatir/MozillaBaseElement.rb +0 -1863
- data/lib/firewatir/htmlelements.rb +0 -1911
- data/unittests/iostring.rb +0 -30
- data/unittests/iostring_test.rb +0 -48
data/unittests/iostring.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# class useful for testing output to stdout
|
2
|
-
class IOString < String
|
3
|
-
def write x
|
4
|
-
self.<< x
|
5
|
-
end
|
6
|
-
def readline!
|
7
|
-
line = slice!(/^.*(\n|$)/)
|
8
|
-
if $1 == "\n" then line.chop!
|
9
|
-
elsif line == "" then nil
|
10
|
-
else line
|
11
|
-
end
|
12
|
-
end
|
13
|
-
def puts( x )
|
14
|
-
stdout_orig = $stdout
|
15
|
-
$stdout = self
|
16
|
-
Kernel.puts x
|
17
|
-
$stdout = stdout_orig
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
module MockStdoutTestCase
|
22
|
-
def setup
|
23
|
-
@mockout = IOString.new ""
|
24
|
-
end
|
25
|
-
def teardown
|
26
|
-
$stdout = STDOUT
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
|
data/unittests/iostring_test.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# unit tests for IOString in iostring.rb
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
|
4
|
-
require 'unittests/iostring'
|
5
|
-
require 'test/unit'
|
6
|
-
|
7
|
-
class IOStringTests < Test::Unit::TestCase
|
8
|
-
include MockStdoutTestCase
|
9
|
-
def setup
|
10
|
-
@mockout = IOString.new ""
|
11
|
-
$stdout = @mockout
|
12
|
-
end
|
13
|
-
def test_io_string_write
|
14
|
-
puts "hello"
|
15
|
-
assert_equal "hello\n", @mockout
|
16
|
-
end
|
17
|
-
def test_iostring_readline
|
18
|
-
puts "hello"
|
19
|
-
puts "there"
|
20
|
-
$stdout = STDOUT
|
21
|
-
assert_equal "hello", @mockout.readline!
|
22
|
-
assert_equal "there", @mockout.readline!
|
23
|
-
end
|
24
|
-
def test_iostring_realine_no_final_cr
|
25
|
-
print "hello"
|
26
|
-
$stdout = STDOUT
|
27
|
-
assert_equal "hello", @mockout.readline!
|
28
|
-
end
|
29
|
-
def test_ending_with_cr
|
30
|
-
puts "hello"
|
31
|
-
@mockout.readline!
|
32
|
-
assert_equal nil, @mockout.readline!
|
33
|
-
end
|
34
|
-
def test_ending_without_cr
|
35
|
-
print "hello"
|
36
|
-
@mockout.readline!
|
37
|
-
assert_equal nil, @mockout.readline!
|
38
|
-
end
|
39
|
-
def test_blank_line
|
40
|
-
puts "hello"
|
41
|
-
puts
|
42
|
-
puts "there"
|
43
|
-
@mockout.readline!
|
44
|
-
assert_equal "", @mockout.readline!
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
|