firewatir 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/MozillaBaseElement.rb +1778 -0
  2. data/container.rb +889 -0
  3. data/firewatir/exceptions.rb +44 -0
  4. data/firewatir/testUnitAddons.rb +8 -0
  5. data/firewatir.rb +1130 -0
  6. data/htmlelements.rb +2277 -0
  7. data/unittests/attach_to_new_window_test.rb +34 -0
  8. data/unittests/bug_fixes_test.rb +188 -0
  9. data/unittests/buttons_test.rb +215 -0
  10. data/unittests/buttons_xpath_test.rb +87 -0
  11. data/unittests/checkbox_test.rb +154 -0
  12. data/unittests/checkbox_xpath_test.rb +107 -0
  13. data/unittests/div_test.rb +274 -0
  14. data/unittests/filefield_test.rb +45 -0
  15. data/unittests/filefield_xpath_test.rb +35 -0
  16. data/unittests/form_test.rb +307 -0
  17. data/unittests/frame_test.rb +151 -0
  18. data/unittests/hidden_test.rb +85 -0
  19. data/unittests/hidden_xpath_test.rb +72 -0
  20. data/unittests/html/JavascriptClick.html +42 -0
  21. data/unittests/html/blankpage.html +12 -0
  22. data/unittests/html/buttons1.html +61 -0
  23. data/unittests/html/checkboxes1.html +71 -0
  24. data/unittests/html/complex_table.html +36 -0
  25. data/unittests/html/cssTest.html +42 -0
  26. data/unittests/html/div.html +72 -0
  27. data/unittests/html/div_xml.html +21 -0
  28. data/unittests/html/fileupload.html +45 -0
  29. data/unittests/html/formTest1.html +39 -0
  30. data/unittests/html/forms2.html +45 -0
  31. data/unittests/html/forms3.html +132 -0
  32. data/unittests/html/forms4.html +27 -0
  33. data/unittests/html/frame_buttons.html +4 -0
  34. data/unittests/html/frame_links.html +4 -0
  35. data/unittests/html/frame_multi.html +5 -0
  36. data/unittests/html/iframeTest.html +15 -0
  37. data/unittests/html/iframeTest1.html +14 -0
  38. data/unittests/html/iframeTest2.html +6 -0
  39. data/unittests/html/images/1.gif +0 -0
  40. data/unittests/html/images/2.GIF +0 -0
  41. data/unittests/html/images/3.GIF +0 -0
  42. data/unittests/html/images/button.jpg +0 -0
  43. data/unittests/html/images/circle.jpg +0 -0
  44. data/unittests/html/images/minus.GIF +0 -0
  45. data/unittests/html/images/originaltriangle.jpg +0 -0
  46. data/unittests/html/images/plus.gif +0 -0
  47. data/unittests/html/images/square.jpg +0 -0
  48. data/unittests/html/images/triangle.jpg +0 -0
  49. data/unittests/html/images1.html +67 -0
  50. data/unittests/html/javascriptevents.html +35 -0
  51. data/unittests/html/link_pass.html +11 -0
  52. data/unittests/html/links1.html +42 -0
  53. data/unittests/html/links2.html +11 -0
  54. data/unittests/html/modal_dialog.html +8 -0
  55. data/unittests/html/modal_dialog_launcher.html +12 -0
  56. data/unittests/html/nestedFrames.html +6 -0
  57. data/unittests/html/new_browser.html +17 -0
  58. data/unittests/html/pass.html +10 -0
  59. data/unittests/html/popups1.html +60 -0
  60. data/unittests/html/pre.html +28 -0
  61. data/unittests/html/radioButtons1.html +71 -0
  62. data/unittests/html/redirect.html +10 -0
  63. data/unittests/html/redirect1.html +9 -0
  64. data/unittests/html/redirect2.html +9 -0
  65. data/unittests/html/redirect3.html +9 -0
  66. data/unittests/html/select_tealeaf.html +54 -0
  67. data/unittests/html/selectboxes1.html +55 -0
  68. data/unittests/html/simple_table.html +26 -0
  69. data/unittests/html/simple_table_buttons.html +104 -0
  70. data/unittests/html/simple_table_columns.html +74 -0
  71. data/unittests/html/table1.html +165 -0
  72. data/unittests/html/tableCell_using_xpath.html +19 -0
  73. data/unittests/html/textarea.html +30 -0
  74. data/unittests/html/textfields1.html +62 -0
  75. data/unittests/html/textsearch.html +44 -0
  76. data/unittests/images_test.rb +204 -0
  77. data/unittests/images_xpath_test.rb +118 -0
  78. data/unittests/iostring.rb +30 -0
  79. data/unittests/iostring_test.rb +48 -0
  80. data/unittests/javascript_test.rb +71 -0
  81. data/unittests/links_test.rb +230 -0
  82. data/unittests/links_xpath_test.rb +79 -0
  83. data/unittests/mozilla_all_tests.rb +18 -0
  84. data/unittests/pre_test.rb +74 -0
  85. data/unittests/radios_test.rb +166 -0
  86. data/unittests/radios_xpath_test.rb +101 -0
  87. data/unittests/redirect_test.rb +40 -0
  88. data/unittests/selectbox_test.rb +141 -0
  89. data/unittests/selectbox_xpath_test.rb +127 -0
  90. data/unittests/setup.rb +35 -0
  91. data/unittests/table_test.rb +372 -0
  92. data/unittests/table_xpath_test.rb +184 -0
  93. data/unittests/textfields_test.rb +230 -0
  94. data/unittests/textfields_xpath_test.rb +112 -0
  95. metadata +144 -0
@@ -0,0 +1,44 @@
1
+ module FireWatir
2
+ module Exception
3
+
4
+ # Root class for all FireWatir Exceptions
5
+ class FireWatirException < RuntimeError
6
+ def initialize(message="")
7
+ super(message)
8
+ end
9
+ end
10
+
11
+ # This exception is thrown if we are unable to connect to JSSh.
12
+ class UnableToStartJSShException < FireWatirException; end
13
+ # This exception is thrown if an attempt is made to access an object that doesn't exist
14
+ class UnknownObjectException < FireWatirException; end
15
+ # This exception is thrown if an attempt is made to access an object that is in a disabled state
16
+ class ObjectDisabledException < FireWatirException; end
17
+ # This exception is thrown if an attempt is made to access a frame that cannot be found
18
+ class UnknownFrameException< FireWatirException; end
19
+ # This exception is thrown if an attempt is made to access a form that cannot be found
20
+ class UnknownFormException< FireWatirException; end
21
+ # This exception is thrown if an attempt is made to access an object that is in a read only state
22
+ class ObjectReadOnlyException < FireWatirException; end
23
+ # This exception is thrown if an attempt is made to access an object when the specified value cannot be found
24
+ class NoValueFoundException < FireWatirException; end
25
+ # This exception gets raised if part of finding an object is missing
26
+ class MissingWayOfFindingObjectException < FireWatirException; end
27
+ # this exception is raised if an attempt is made to access a table cell that doesnt exist
28
+ class UnknownCellException < FireWatirException; end
29
+ # This exception is thrown if the window cannot be found
30
+ class NoMatchingWindowFoundException < FireWatirException; end
31
+ # This exception is thrown if an attemp is made to acces the status bar of the browser when it doesnt exist
32
+ class NoStatusBarException < FireWatirException; end
33
+ # This exception is thrown if an http error, such as a 404, 500 etc is encountered while navigating
34
+ class NavigationException < FireWatirException; end
35
+ # This exception is raised if a timeout is exceeded
36
+ class TimeOutException < FireWatirException
37
+ def initialize(duration, timeout)
38
+ @duration, @timeout = duration, timeout
39
+ end
40
+ attr_reader :duration, :timeout
41
+ end
42
+
43
+ end
44
+ end
@@ -0,0 +1,8 @@
1
+ module Test::Unit::Assertions
2
+ def assert_false(boolean, message=nil)
3
+ _wrap_assertion do
4
+ assert_block("assert should not be called with a block.") { !block_given? }
5
+ assert_block(build_message(message, "<?> is not false.", boolean)) { !boolean }
6
+ end
7
+ end
8
+ end # module test