watir-classic 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/.gitmodules +3 -0
- data/.rspec +1 -0
- data/.yardopts +5 -0
- data/CHANGES +20 -10
- data/CONTRIBUTORS.txt +55 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +78 -0
- data/README.rdoc +8 -14
- data/Rakefile +32 -0
- data/VERSION +1 -1
- data/lib/watir-classic.rb +0 -1
- data/lib/watir-classic/IEDialog/IEDialog.cpp +225 -0
- data/lib/watir-classic/IEDialog/IEDialog.h +15 -0
- data/lib/watir-classic/IEDialog/IEDialog.vcproj +159 -0
- data/lib/watir-classic/IEDialog/ReadMe.txt +40 -0
- data/lib/watir-classic/IEDialog/stdafx.cpp +8 -0
- data/lib/watir-classic/IEDialog/stdafx.h +21 -0
- data/lib/watir-classic/browser.rb +1 -1
- data/lib/watir-classic/container.rb +4 -33
- data/lib/watir-classic/core.rb +1 -3
- data/lib/watir-classic/dialogs/alert.rb +46 -0
- data/lib/watir-classic/dialogs/file_field.rb +1 -0
- data/lib/watir-classic/drag_and_drop_helper.rb +18 -6
- data/lib/watir-classic/element.rb +0 -2
- data/lib/watir-classic/ext/json2.js +487 -0
- data/lib/watir-classic/ie-class.rb +10 -164
- data/lib/watir-classic/ie.rb +2 -0
- data/lib/watir-classic/input_elements.rb +1 -1
- data/lib/watir-classic/modal_dialog.rb +1 -7
- data/lib/watir-classic/module.rb +1 -10
- data/lib/watir-classic/non_control_elements.rb +11 -0
- data/lib/watir-classic/page-container.rb +22 -24
- data/lib/watir-classic/screenshot.rb +33 -0
- data/lib/watir-classic/win32ole/1.8.7/win32ole.patch +56 -0
- data/lib/watir-classic/win32ole/1.9.3/win32ole.patch +63 -0
- data/lib/watir-classic/win32ole/build_notes.txt +18 -0
- data/lib/watir-classic/win32ole/history.txt +88 -0
- data/spec/browser_spec.rb +34 -0
- data/spec/implementation.rb +18 -0
- data/watir-classic.gemspec +40 -0
- data/watir.gif +0 -0
- metadata +159 -192
- data/bin/watir-console +0 -5
- data/lib/watir-classic/assertions.rb +0 -44
- data/lib/watir-classic/dialogs/javascript.rb +0 -43
- data/lib/watir-classic/irb-history.rb +0 -31
- data/lib/watir-classic/logger.rb +0 -19
- data/lib/watir-classic/screen_capture.rb +0 -115
- data/lib/watir-classic/testcase.rb +0 -97
- data/lib/watir-classic/waiter.rb +0 -98
- data/rakefile.rb +0 -54
- data/unittests/all_tests.rb +0 -10
- data/unittests/buttons_xpath_test.rb +0 -68
- data/unittests/checkbox_test.rb +0 -163
- data/unittests/checkbox_xpath_test.rb +0 -106
- data/unittests/click_no_wait_test.rb +0 -23
- data/unittests/close_all_test.rb +0 -17
- data/unittests/core_tests.rb +0 -17
- data/unittests/css_selector_test.rb +0 -44
- data/unittests/css_test.rb +0 -38
- data/unittests/dialog_test.rb +0 -64
- data/unittests/div2_xpath_test.rb +0 -21
- data/unittests/div_test.rb +0 -170
- data/unittests/div_xpath_test.rb +0 -95
- data/unittests/document_standards.rb +0 -63
- data/unittests/element_collection_indexes_test.rb +0 -57
- data/unittests/element_collections_test.rb +0 -100
- data/unittests/element_test.rb +0 -47
- data/unittests/errorchecker_test.rb +0 -31
- data/unittests/filefield_test.rb +0 -43
- data/unittests/filefield_xpath_test.rb +0 -35
- data/unittests/form_test.rb +0 -282
- data/unittests/form_xpath_test.rb +0 -254
- data/unittests/frame_test.rb +0 -165
- data/unittests/google_form_test.rb +0 -15
- data/unittests/html/JavascriptClick.html +0 -39
- data/unittests/html/blankpage.html +0 -11
- data/unittests/html/buttons1.html +0 -40
- data/unittests/html/checkboxes1.html +0 -89
- data/unittests/html/click_no_wait.html +0 -14
- data/unittests/html/complex_table.html +0 -35
- data/unittests/html/cssTest.html +0 -42
- data/unittests/html/depot_store.html +0 -59
- data/unittests/html/div.html +0 -92
- data/unittests/html/div_xml.html +0 -21
- data/unittests/html/fileupload.html +0 -44
- data/unittests/html/formTest1.html +0 -38
- data/unittests/html/forms2.html +0 -44
- data/unittests/html/forms3.html +0 -131
- data/unittests/html/forms4.html +0 -26
- data/unittests/html/frame_buttons.html +0 -4
- data/unittests/html/frame_links.html +0 -4
- data/unittests/html/frame_multi.html +0 -5
- data/unittests/html/google_india.html +0 -119
- data/unittests/html/ie7_document_standards.html +0 -9
- data/unittests/html/ie8_document_standards.html +0 -9
- data/unittests/html/ie9_document_standards.html +0 -9
- data/unittests/html/iframe.html +0 -3
- data/unittests/html/iframeTest.html +0 -17
- data/unittests/html/iframeTest1.html +0 -7
- data/unittests/html/iframeTest2.html +0 -5
- data/unittests/html/images/1.gif +0 -0
- data/unittests/html/images/2.GIF +0 -0
- data/unittests/html/images/3.GIF +0 -0
- data/unittests/html/images/button.jpg +0 -0
- data/unittests/html/images/circle.jpg +0 -0
- data/unittests/html/images/map.GIF +0 -0
- data/unittests/html/images/map2.gif +0 -0
- data/unittests/html/images/minus.GIF +0 -0
- data/unittests/html/images/originaltriangle.jpg +0 -0
- data/unittests/html/images/plus.gif +0 -0
- data/unittests/html/images/square.jpg +0 -0
- data/unittests/html/images/triangle.jpg +0 -0
- data/unittests/html/images1.html +0 -65
- data/unittests/html/javascriptevents.html +0 -33
- data/unittests/html/link_pass.html +0 -11
- data/unittests/html/links1.html +0 -37
- data/unittests/html/links2.html +0 -11
- data/unittests/html/links_multi.html +0 -12
- data/unittests/html/list_matters.html +0 -720
- data/unittests/html/lists.html +0 -18
- data/unittests/html/map_test.html +0 -30
- data/unittests/html/modal_dialog.html +0 -10
- data/unittests/html/modal_dialog_launcher.html +0 -12
- data/unittests/html/multiple_specifiers.html +0 -64
- data/unittests/html/nestedFrames.html +0 -6
- data/unittests/html/new_browser.html +0 -17
- data/unittests/html/pass.html +0 -13
- data/unittests/html/popups1.html +0 -59
- data/unittests/html/pre.html +0 -29
- data/unittests/html/quirks_document_standards.html +0 -8
- data/unittests/html/radioButtons1.html +0 -71
- data/unittests/html/select_tealeaf.html +0 -54
- data/unittests/html/selectboxes1.html +0 -52
- data/unittests/html/simple_table.html +0 -25
- data/unittests/html/simple_table_buttons.html +0 -104
- data/unittests/html/simple_table_columns.html +0 -75
- data/unittests/html/table1.html +0 -179
- data/unittests/html/tableCell_using_xpath.html +0 -19
- data/unittests/html/table_and_tablerow_to_a.html +0 -174
- data/unittests/html/textarea.html +0 -30
- data/unittests/html/textfields1.html +0 -100
- data/unittests/html/textsearch.html +0 -44
- data/unittests/html/wallofcheckboxes.html +0 -1003
- data/unittests/html/xpath_nbsp.html +0 -11
- data/unittests/html/zeroindex.html +0 -11
- data/unittests/ie_exists_test.rb +0 -16
- data/unittests/ie_mock.rb +0 -94
- data/unittests/ie_test.rb +0 -54
- data/unittests/images_test.rb +0 -156
- data/unittests/images_xpath_test.rb +0 -90
- data/unittests/index_specifier_test.rb +0 -31
- data/unittests/js_events_test.rb +0 -31
- data/unittests/links_multi_test.rb +0 -34
- data/unittests/links_test.rb +0 -131
- data/unittests/links_xpath_test.rb +0 -38
- data/unittests/lists_test.rb +0 -23
- data/unittests/map_test.rb +0 -98
- data/unittests/minmax_test.rb +0 -37
- data/unittests/navigate_test.rb +0 -38
- data/unittests/nbsp_xpath_test.rb +0 -16
- data/unittests/no_wait_test.rb +0 -28
- data/unittests/non_core_tests.rb +0 -12
- data/unittests/other/all_tests_concurrent.rb +0 -57
- data/unittests/other/navigate_exception_test.rb +0 -24
- data/unittests/other/rexml_unit_test.rb +0 -27
- data/unittests/other/screen_capture_test.rb +0 -53
- data/unittests/other/testcase_method_order_test.rb +0 -36
- data/unittests/other/testcase_verify_test.rb +0 -25
- data/unittests/other/wait_until_test.rb +0 -102
- data/unittests/pagecontainstext_test.rb +0 -69
- data/unittests/parent_child_test.rb +0 -27
- data/unittests/perf_test.rb +0 -20
- data/unittests/pre_test.rb +0 -49
- data/unittests/radios_test.rb +0 -181
- data/unittests/radios_xpath_test.rb +0 -100
- data/unittests/security_setting_test.rb +0 -24
- data/unittests/selectbox_test.rb +0 -144
- data/unittests/selectbox_xpath_test.rb +0 -102
- data/unittests/setup.rb +0 -69
- data/unittests/speed_settings_test.rb +0 -67
- data/unittests/table_cell_using_xpath_test.rb +0 -34
- data/unittests/table_test.rb +0 -296
- data/unittests/table_xpath_test.rb +0 -109
- data/unittests/test_tests.rb +0 -9
- data/unittests/textarea_test.rb +0 -92
- data/unittests/textarea_xpath_test.rb +0 -77
- data/unittests/textfield_for_ch_char_test.rb +0 -32
- data/unittests/textfields_test.rb +0 -184
- data/unittests/textfields_xpath_test.rb +0 -110
- data/unittests/version_test.rb +0 -15
- data/unittests/win32ole_so_test.rb +0 -35
- data/unittests/window_tests.rb +0 -10
- data/unittests/windows/attach_to_existing_window_test.rb +0 -52
- data/unittests/windows/attach_to_new_window_test.rb +0 -74
- data/unittests/windows/close_window_test.rb +0 -20
- data/unittests/windows/frame_links_test.rb +0 -23
- data/unittests/windows/ie-each_test.rb +0 -46
- data/unittests/windows/modal_dialog_test.rb +0 -95
- data/unittests/windows/new_process_test.rb +0 -24
- data/unittests/windows/new_test.rb +0 -58
- data/unittests/windows/open_close_test.rb +0 -19
- data/unittests/windows/send_keys_test.rb +0 -26
- data/unittests/xpath_tests.rb +0 -11
- data/watir-rdoc.rb +0 -7
@@ -1,24 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
2
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'commonwatir', 'lib')
|
3
|
-
require 'test/unit'
|
4
|
-
require 'watir-classic/ie'
|
5
|
-
|
6
|
-
class TC_NewProcess < Test::Unit::TestCase
|
7
|
-
def test_new_process_single_window
|
8
|
-
assert_nothing_raised {
|
9
|
-
ie = Watir::IE.new_process
|
10
|
-
ie.goto 'www.yahoo.com'
|
11
|
-
ie.close
|
12
|
-
}
|
13
|
-
end
|
14
|
-
def test_new_process_multiple_windows
|
15
|
-
assert_nothing_raised {
|
16
|
-
ie1 = Watir::IE.new_process
|
17
|
-
ie1.goto 'www.yahoo.com'
|
18
|
-
ie2 = Watir::IE.new_process
|
19
|
-
ie2.goto 'www.google.com'
|
20
|
-
ie1.close
|
21
|
-
ie2.close
|
22
|
-
}
|
23
|
-
end
|
24
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..') unless $SETUP_LOADED
|
2
|
-
|
3
|
-
require 'unittests/setup'
|
4
|
-
require 'watir-classic/contrib/ie-new-process'
|
5
|
-
require 'watir-classic/process'
|
6
|
-
|
7
|
-
class TC_New < Test::Unit::TestCase
|
8
|
-
|
9
|
-
def setup
|
10
|
-
@background_iexplore_processes = Watir::IE.process_count
|
11
|
-
if @background_iexplore_process == 0
|
12
|
-
@background = Watir::IE.new
|
13
|
-
assert_equal 1, Watir::IE.process_count
|
14
|
-
@background_iexplore_process = 1
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def teardown
|
19
|
-
@background.close if @background
|
20
|
-
@new.close if @new
|
21
|
-
sleep 1.0 # give it time to close
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_new_window_does_not_create_new_process
|
25
|
-
@new = Watir::IE.new_window
|
26
|
-
assert_equal @background_iexplore_processes, Watir::IE.process_count
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_new_does_not_create_new_process
|
30
|
-
@new = Watir::IE.new
|
31
|
-
assert_equal @background_iexplore_processes, Watir::IE.process_count
|
32
|
-
end
|
33
|
-
|
34
|
-
def test_start_window_with_no_args_works_like_new_window
|
35
|
-
@new = Watir::IE.start_window
|
36
|
-
assert_equal @background_iexplore_processes, Watir::IE.process_count
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_start_window_with_url_also_goes_to_that_page
|
40
|
-
@new = Watir::IE.start_window 'http://wtr.rubyforge.org'
|
41
|
-
assert_equal @background_iexplore_processes, Watir::IE.process_count
|
42
|
-
assert_equal 'http://wtr.rubyforge.org/', @new.url
|
43
|
-
end
|
44
|
-
|
45
|
-
tag_method :test_new_process_creates_a_new_process, :fails_on_ie
|
46
|
-
def test_new_process_creates_a_new_process
|
47
|
-
@new = Watir::IE.new_process
|
48
|
-
assert_equal @background_iexplore_processes + 1, Watir::IE.process_count
|
49
|
-
end
|
50
|
-
|
51
|
-
tag_method :test_start_process_with_arg_creates_a_new_process_and_goes_to_that_page, :fails_on_ie
|
52
|
-
def test_start_process_with_arg_creates_a_new_process_and_goes_to_that_page
|
53
|
-
@new = Watir::IE.start_process 'http://wtr.rubyforge.org'
|
54
|
-
assert_equal @background_iexplore_processes + 1, Watir::IE.process_count
|
55
|
-
assert_equal 'http://wtr.rubyforge.org/', @new.url
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# rapidly open and close IE windows
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'commonwatir', 'lib')
|
5
|
-
require 'test/unit'
|
6
|
-
require 'watir-classic/ie'
|
7
|
-
require 'watir-classic/contrib/ie-new-process'
|
8
|
-
|
9
|
-
class ZZ_OpenClose < Test::Unit::TestCase
|
10
|
-
20.times do | i |
|
11
|
-
define_method "test_#{i}" do
|
12
|
-
sleep 0.05
|
13
|
-
sleep i * 0.01
|
14
|
-
ie = Watir::IE.new_process
|
15
|
-
ie.goto 'http://blogs.dovetailsoftware.com/blogs/gsherman/default.aspx'
|
16
|
-
ie.close
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# feature tests for IE#send_keys
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..') unless $SETUP_LOADED
|
4
|
-
require 'unittests/setup'
|
5
|
-
|
6
|
-
class TC_SendKeys < Test::Unit::TestCase
|
7
|
-
def setup
|
8
|
-
goto_page "textfields1.html"
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_tabbing
|
12
|
-
browser.text_field(:name, 'text1').focus
|
13
|
-
browser.send_keys('{tab}')
|
14
|
-
browser.send_keys('Scooby')
|
15
|
-
assert('Scooby', browser.text_field(:name, 'beforetest').value)
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_enter
|
19
|
-
browser.text_field(:name, 'text1').focus
|
20
|
-
browser.send_keys('{tab}{tab}{tab}{tab}{tab}')
|
21
|
-
browser.send_keys('Dooby{enter}')
|
22
|
-
sleep 0.2
|
23
|
-
assert(browser.text.include?('PASS'))
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
data/unittests/xpath_tests.rb
DELETED