firewatir 1.6.2 → 1.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/LICENSE +32 -0
  2. data/lib/firewatir.rb +40 -50
  3. data/lib/firewatir/container.rb +491 -534
  4. data/lib/firewatir/document.rb +239 -0
  5. data/lib/firewatir/element.rb +1365 -0
  6. data/lib/firewatir/element_collections.rb +314 -0
  7. data/lib/firewatir/elements/button.rb +15 -0
  8. data/lib/firewatir/elements/file_field.rb +29 -0
  9. data/lib/firewatir/elements/form.rb +40 -0
  10. data/lib/firewatir/elements/frame.rb +55 -0
  11. data/lib/firewatir/elements/hidden.rb +56 -0
  12. data/lib/firewatir/elements/image.rb +139 -0
  13. data/lib/firewatir/elements/input_element.rb +44 -0
  14. data/lib/firewatir/elements/link.rb +76 -0
  15. data/lib/firewatir/elements/non_control_element.rb +53 -0
  16. data/lib/firewatir/elements/non_control_elements.rb +108 -0
  17. data/lib/firewatir/elements/not_used.rb +278 -0
  18. data/lib/firewatir/elements/option.rb +131 -0
  19. data/lib/firewatir/elements/radio_check_common.rb +163 -0
  20. data/lib/firewatir/elements/select_list.rb +188 -0
  21. data/lib/firewatir/elements/table.rb +218 -0
  22. data/lib/firewatir/elements/table_cell.rb +54 -0
  23. data/lib/firewatir/elements/table_row.rb +100 -0
  24. data/lib/firewatir/elements/text_field.rb +218 -0
  25. data/lib/firewatir/exceptions.rb +10 -10
  26. data/lib/firewatir/firefox.rb +1040 -1127
  27. data/lib/firewatir/jssh_socket.rb +101 -0
  28. data/lib/firewatir/version.rb +5 -5
  29. data/unittests/attach_to_new_window_test.rb +49 -42
  30. data/unittests/bug_fixes_test.rb +195 -198
  31. data/unittests/buttons_xpath_test.rb +88 -88
  32. data/unittests/checkbox_test.rb +158 -155
  33. data/unittests/checkbox_xpath_test.rb +107 -107
  34. data/unittests/div_test.rb +275 -276
  35. data/unittests/filefield_test.rb +49 -45
  36. data/unittests/filefield_xpath_test.rb +35 -35
  37. data/unittests/form_test.rb +296 -308
  38. data/unittests/frame_test.rb +159 -152
  39. data/unittests/hidden_test.rb +85 -85
  40. data/unittests/hidden_xpath_test.rb +72 -72
  41. data/unittests/html/blankpage.html +11 -11
  42. data/unittests/html/buttons1.html +61 -61
  43. data/unittests/html/cssTest.html +42 -42
  44. data/unittests/html/div.html +72 -72
  45. data/unittests/html/fileupload.html +45 -45
  46. data/unittests/html/formTest1.html +38 -38
  47. data/unittests/html/forms2.html +45 -45
  48. data/unittests/html/frame_buttons.html +3 -3
  49. data/unittests/html/iframeTest.html +14 -14
  50. data/unittests/html/iframeTest1.html +13 -13
  51. data/unittests/html/iframeTest2.html +5 -5
  52. data/unittests/html/links1.html +42 -42
  53. data/unittests/html/nestedFrames.html +6 -6
  54. data/unittests/html/new_browser.html +1 -0
  55. data/unittests/html/new_browser_popup.html +8 -0
  56. data/unittests/html/pass.html +9 -9
  57. data/unittests/html/pre.html +27 -27
  58. data/unittests/html/redirect.html +10 -10
  59. data/unittests/html/redirect1.html +8 -8
  60. data/unittests/html/redirect2.html +8 -8
  61. data/unittests/html/redirect3.html +8 -8
  62. data/unittests/html/simple_table_columns.html +74 -74
  63. data/unittests/html/table1.html +165 -165
  64. data/unittests/html/textfields1.html +62 -62
  65. data/unittests/images_test.rb +198 -205
  66. data/unittests/images_xpath_test.rb +118 -119
  67. data/unittests/javascript_test.rb +75 -75
  68. data/unittests/links_test.rb +231 -232
  69. data/unittests/links_xpath_test.rb +79 -79
  70. data/unittests/mozilla_all_tests.rb +7 -7
  71. data/unittests/pre_test.rb +75 -76
  72. data/unittests/radios_xpath_test.rb +101 -101
  73. data/unittests/redirect_test.rb +41 -41
  74. data/unittests/selectbox_test.rb +142 -142
  75. data/unittests/selectbox_xpath_test.rb +129 -129
  76. data/unittests/setup.rb +29 -30
  77. data/unittests/table_test.rb +385 -373
  78. data/unittests/table_xpath_test.rb +185 -185
  79. data/unittests/textfields_test.rb +234 -233
  80. data/unittests/textfields_xpath_test.rb +113 -113
  81. metadata +33 -11
  82. data/lib/firewatir/MozillaBaseElement.rb +0 -1863
  83. data/lib/firewatir/htmlelements.rb +0 -1911
  84. data/unittests/iostring.rb +0 -30
  85. data/unittests/iostring_test.rb +0 -48
@@ -1,45 +1,45 @@
1
- <html>
2
- <head>
3
- <title>
4
- Test page for File Fields
5
- </title>
6
- </head>
7
- <body>
8
- CVS Revision: "$Revision: 1.0 $"
9
- <br>
10
- <br>
11
- <table>
12
-
13
- <tr>
14
- <td>
15
- <input type = file name = file1 value = 'fileupload.html' class='file_class' >number 1
16
- <br>
17
- <input type = file id= file2 value = 'fileupload.html'>
18
-
19
-
20
- <td>These file fields are not in a form
21
-
22
-
23
- <tr>
24
- <td>
25
- <input type = file name = disabled value = 'fileupload.html' disabled>
26
- <td>
27
- Disabled file box
28
-
29
- <form name = test1 method = get action = pass.html>
30
- <tr>
31
- <td>
32
- <input type = file name = file3 value = 'fileupload.html'>
33
- <td> This is used in file3 in form test1
34
-
35
- <input name="upload" type="submit" value="upload">
36
- </form>
37
- </table>
38
-
39
- These file fields are used to test :beforeText and :afterText
40
- <br>
41
- <input type = file name = beforetest value = 'fileupload.html'>This Text After
42
- <br>
43
- This Text Before<input type = file name=aftertest value = 'fileupload.html'>
44
-
45
- </html>
1
+ <html>
2
+ <head>
3
+ <title>
4
+ Test page for File Fields
5
+ </title>
6
+ </head>
7
+ <body>
8
+ CVS Revision: "$Revision: 1.0 $"
9
+ <br>
10
+ <br>
11
+ <table>
12
+
13
+ <tr>
14
+ <td>
15
+ <input type = file name = file1 value = 'fileupload.html' class='file_class' >number 1
16
+ <br>
17
+ <input type = file id= file2 value = 'fileupload.html'>
18
+
19
+
20
+ <td>These file fields are not in a form
21
+
22
+
23
+ <tr>
24
+ <td>
25
+ <input type = file name = disabled value = 'fileupload.html' disabled>
26
+ <td>
27
+ Disabled file box
28
+
29
+ <form name = test1 method = get action = pass.html>
30
+ <tr>
31
+ <td>
32
+ <input type = file name = file3 value = 'fileupload.html' onchange="this.alt = 'changed'">
33
+ <td> This is used in file3 in form test1
34
+
35
+ <input name="upload" type="submit" value="upload">
36
+ </form>
37
+ </table>
38
+
39
+ These file fields are used to test :beforeText and :afterText
40
+ <br>
41
+ <input type = file name = beforetest value = 'fileupload.html'>This Text After
42
+ <br>
43
+ This Text Before<input type = file name=aftertest value = 'fileupload.html'>
44
+
45
+ </html>
@@ -1,39 +1,39 @@
1
- <html>
2
- <head>
3
- <title>
4
- Test page for forms
5
- </title>
6
- </head>
7
- <body>
8
- CVS Revision: $Revision 1.0$
9
- <br>
10
- <br>
11
- <table>
12
- <tr>
13
- <td>
14
- <form name = test1 method = get action = pass.html>
15
-
16
- <input type = button name = b1 id = b2 value = "Click Me" onClick="javascript:document.location='pass.html';">
17
- <br><input type = button name = b4 id=b5 value = "Disabled Button" onClick="javascript:document.location='fail.html';" disabled>
18
-
19
- </form>
20
- <td> this form has name = test1 method = get action = pass.html
21
-
22
-
23
- <tr>
24
- <td>
25
- <form name = test2 method = get action = pass2.html>
26
- <br><input type = submit value=Submit>
27
- </form>
28
- <td> this form has name = test2 method = get action = pass2.html
29
-
30
- <tr>
31
- <td>
32
- <form id = test3 method = post action = pass3.html>
33
- <br><input type = image src=images/image1.gif name =sub3>
34
- </form>
35
- <td> this form has id = test3 method = post action = pass3.html
36
-
37
-
38
-
1
+ <html>
2
+ <head>
3
+ <title>
4
+ Test page for forms
5
+ </title>
6
+ </head>
7
+ <body>
8
+ CVS Revision: $Revision 1.0$
9
+ <br>
10
+ <br>
11
+ <table>
12
+ <tr>
13
+ <td>
14
+ <form name = test1 method = get action = pass.html>
15
+
16
+ <input type = button name = b1 id = b2 value = "Click Me" onClick="javascript:document.location='pass.html';">
17
+ <br><input type = button name = b4 id=b5 value = "Disabled Button" onClick="javascript:document.location='fail.html';" disabled>
18
+
19
+ </form>
20
+ <td> this form has name = test1 method = get action = pass.html
21
+
22
+
23
+ <tr>
24
+ <td>
25
+ <form name = test2 method = get action = pass2.html>
26
+ <br><input type = submit value=Submit>
27
+ </form>
28
+ <td> this form has name = test2 method = get action = pass2.html
29
+
30
+ <tr>
31
+ <td>
32
+ <form id = test3 method = post action = pass3.html>
33
+ <br><input type = image src=images/image1.gif name =sub3>
34
+ </form>
35
+ <td> this form has id = test3 method = post action = pass3.html
36
+
37
+
38
+
39
39
  </html>
@@ -1,45 +1,45 @@
1
- <html>
2
- <head>
3
- <title>
4
- Test page for Forms
5
- </title>
6
- </head>
7
- <body>
8
- CVS Revision: "$Revision: 1.0 $"
9
- <br>
10
- <br>
11
- <table>
12
- <tr>
13
- <td>
14
- <form method = get action = pass.html>
15
- <input type = button name = b1 id = b2 value = "Click Me" >
16
- </form>
17
-
18
- <td> Form with no name
19
-
20
-
21
- <tr>
22
- <td>
23
- <form name = test2 id = f2 method = get action = pass2.html>
24
- <br><input type = submit value=Submit>
25
- </form>
26
- <td> This form is identical to the one above
27
-
28
-
29
-
30
- <tr>
31
- <td>
32
- <form name = test3 method = get action = pass2.html>
33
- <br><input type = submit value=Submit>
34
- </form>
35
- <td> This form has a name
36
- <tr>
37
- <td>
38
- <form name = test2 method = get action = pass2.html>
39
- <br><input type = submit value=Submit>
40
- </form>
41
- <td> This form has a name
42
-
43
-
44
- </body>
45
- </html>
1
+ <html>
2
+ <head>
3
+ <title>
4
+ Test page for Forms
5
+ </title>
6
+ </head>
7
+ <body>
8
+ CVS Revision: "$Revision: 1.0 $"
9
+ <br>
10
+ <br>
11
+ <table>
12
+ <tr>
13
+ <td>
14
+ <form method = get action = pass.html>
15
+ <input type = button name = b1 id = b2 value = "Click Me" >
16
+ </form>
17
+
18
+ <td> Form with no name
19
+
20
+
21
+ <tr>
22
+ <td>
23
+ <form name = test2 id = f2 method = get action = pass2.html>
24
+ <br><input type = submit value=Submit>
25
+ </form>
26
+ <td> This form is identical to the one above
27
+
28
+
29
+
30
+ <tr>
31
+ <td>
32
+ <form name = test3 method = get action = pass2.html>
33
+ <br><input type = submit value=Submit>
34
+ </form>
35
+ <td> This form has a name
36
+ <tr>
37
+ <td>
38
+ <form name = test2 method = get action = pass2.html>
39
+ <br><input type = submit value=Submit>
40
+ </form>
41
+ <td> This form has a name
42
+
43
+
44
+ </body>
45
+ </html>
@@ -1,4 +1,4 @@
1
- <frameset cols=50,50 >
2
- <frame src = buttons1.html name = buttonFrame>
3
- <frame src = blankpage.html name = buttonFrame2>
1
+ <frameset cols=50,50 >
2
+ <frame src = buttons1.html name = buttonFrame>
3
+ <frame src = blankpage.html name = buttonFrame2>
4
4
  </frameset>
@@ -1,15 +1,15 @@
1
- <html>
2
- <body>
3
-
4
-
5
- <table>
6
- <tr>
7
- <td>
8
- <iframe src = iframeTest1.html name = senderFrame width = 300 height = 300></iframe>
9
- </td>
10
- <td>
11
- <iframe src = iframeTest2.html name = receiverFrame width = 300 height = 300></iframe>
12
- </td>
13
- </tr>
14
- </table>
1
+ <html>
2
+ <body>
3
+
4
+
5
+ <table>
6
+ <tr>
7
+ <td>
8
+ <iframe src = iframeTest1.html name = senderFrame width = 300 height = 300></iframe>
9
+ </td>
10
+ <td>
11
+ <iframe src = iframeTest2.html name = receiverFrame width = 300 height = 300></iframe>
12
+ </td>
13
+ </tr>
14
+ </table>
15
15
  </html>
@@ -1,14 +1,14 @@
1
- <html>
2
- <body>
3
- <script lang = "javascript 1.2">
4
- function sendText()
5
- {
6
- var text = document.getElementById("textToSend").value;
7
- parent.receiverFrame.document.getElementById("receiverText").value = text;
8
- }
9
- </script>
10
- <form name = sender>
11
- <input type = text name = textToSend id = textToSend>
12
- <input type = button name = sendIt value = "SendIt" onClick="sendText();">
13
- </body>
1
+ <html>
2
+ <body>
3
+ <script lang = "javascript 1.2">
4
+ function sendText()
5
+ {
6
+ var text = document.getElementById("textToSend").value;
7
+ parent.receiverFrame.document.getElementById("receiverText").value = text;
8
+ }
9
+ </script>
10
+ <form name = sender>
11
+ <input type = text name = textToSend id = textToSend>
12
+ <input type = button name = sendIt value = "SendIt" onClick="sendText();">
13
+ </body>
14
14
  </html>
@@ -1,6 +1,6 @@
1
- <html>
2
- <body>
3
-
4
- <input type = text name = receiverText id = receiverText>
5
- </body>
1
+ <html>
2
+ <body>
3
+
4
+ <input type = text name = receiverText id = receiverText>
5
+ </body>
6
6
  </html>
@@ -1,42 +1,42 @@
1
- <html>
2
- <head>
3
- <title>Test page for Links</title>
4
- <link rel="stylesheet" type="text/css" href="firewatir_unit_tests.css"></link>
5
- </head>
6
-
7
- <body>
8
- CVS Revision: $Revision 1.0 $
9
- <br></br>
10
- <br></br>
11
- <table>
12
- <tbody>
13
- <tr>
14
- <td> <a href="links2.html">test1</a> <br></br>
15
- <a href="link_pass.html" class="link_class_1">test1</a> <br></br>
16
- <a href="pass3.html"><img src="images/button.jpg" border="0" alt=""></img></a> The button is really a link <br></br>
17
- <a href="textarea.html" target="_blank">new window</a> <a href="textarea.html" target="_blank">new window</a> </td>
18
- </tr>
19
- <tr>
20
- <td> <a href="links1.HTML" id="link_id">Link Using an ID</a> </td>
21
- </tr>
22
- <tr>
23
- <td> <a href="links1.HTML" name="link_name">Link Using a name</a>
24
- </td>
25
- </tr>
26
- <tr>
27
- <td> <a href="links1.HTML" title="link_title">Link Using a title</a>
28
- </td>
29
- </tr>
30
-
31
- <tr>
32
- <td><a href = "pass.html"><img src="images/triangle.jpg" alt=""></img>Image and a text link</a></td>
33
- </tr>
34
-
35
- </tbody>
36
- </table>
37
-
38
- <a id="linktos" href="link_pass.html" class="link_class_1">to string test</a> <br></br>
39
-
40
- <a href="link1.html" name="test_link"><span class="spanClass">name<span class="delete">Delet</span></span</a>
41
- </body>
42
- </html>
1
+ <html>
2
+ <head>
3
+ <title>Test page for Links</title>
4
+ <link rel="stylesheet" type="text/css" href="firewatir_unit_tests.css"></link>
5
+ </head>
6
+
7
+ <body>
8
+ CVS Revision: $Revision 1.0 $
9
+ <br></br>
10
+ <br></br>
11
+ <table>
12
+ <tbody>
13
+ <tr>
14
+ <td> <a href="links2.html">test1</a> <br></br>
15
+ <a href="link_pass.html" class="link_class_1">test1</a> <br></br>
16
+ <a href="pass3.html"><img src="images/button.jpg" border="0" alt=""></img></a> The button is really a link <br></br>
17
+ <a href="textarea.html" target="_blank">new window</a> <a href="textarea.html" target="_blank">new window</a> </td>
18
+ </tr>
19
+ <tr>
20
+ <td> <a href="links1.HTML" id="link_id">Link Using an ID</a> </td>
21
+ </tr>
22
+ <tr>
23
+ <td> <a href="links1.HTML" name="link_name">Link Using a name</a>
24
+ </td>
25
+ </tr>
26
+ <tr>
27
+ <td> <a href="links1.HTML" title="link_title">Link Using a title</a>
28
+ </td>
29
+ </tr>
30
+
31
+ <tr>
32
+ <td><a href = "pass.html"><img src="images/triangle.jpg" alt=""></img>Image and a text link</a></td>
33
+ </tr>
34
+
35
+ </tbody>
36
+ </table>
37
+
38
+ <a id="linktos" href="link_pass.html" class="link_class_1">to string test</a> <br></br>
39
+
40
+ <a href="link1.html" name="test_link"><span class="spanClass">name<span class="delete">Delet</span></span</a>
41
+ </body>
42
+ </html>
@@ -1,6 +1,6 @@
1
- <html><head><title>Nested Frames</title></head>
2
- <frameset cols=70,30 >
3
-
4
- <frame src = iframeTest.html name = nestedFrame>
5
- <frame src = blankpage.html name = nestedFrame2>
6
- </frameset>
1
+ <html><head><title>Nested Frames</title></head>
2
+ <frameset cols=70,30 >
3
+
4
+ <frame src = iframeTest.html name = nestedFrame>
5
+ <frame src = blankpage.html name = nestedFrame2>
6
+ </frameset>
@@ -10,6 +10,7 @@
10
10
  <body>
11
11
  <h1>New Browser Launcher</h1>
12
12
  <p>This link brings up a window marked "pass": <a href="pass.html" target="_blank">New Window</a></p>
13
+ <p>This link brings up a window marked "pass" with same title as this parent window: <a href="new_browser_popup.html" target="_blank">New Browser Window</a></p>
13
14
  <p>This link brings up a window marked "blank for frames" after a delay:
14
15
  <span onclick="open_window_slowly();">New Window Slowly</span></p>
15
16
  <p> Number of seconds to wait: <input type="text" name="delay" value="0.5"></input></p>