firewatir 1.6.6 → 1.6.7.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +29 -0
- data/LICENSE +33 -31
- data/VERSION +1 -1
- data/firewatir.gemspec +3 -2
- data/lib/firewatir/element.rb +12 -7
- data/lib/firewatir/firefox.rb +1 -0
- data/lib/firewatir/jssh_socket.rb +8 -1
- data/lib/firewatir.rb +1 -3
- data/unittests/attach_to_new_window_test.rb +0 -1
- data/unittests/bug_fixes_test.rb +5 -0
- data/unittests/buttons_xpath_test.rb +0 -1
- data/unittests/checkbox_test.rb +0 -1
- data/unittests/checkbox_xpath_test.rb +0 -1
- data/unittests/div_test.rb +0 -1
- data/unittests/ff_test.rb +0 -1
- data/unittests/filefield_test.rb +0 -1
- data/unittests/filefield_xpath_test.rb +0 -1
- data/unittests/form_test.rb +0 -1
- data/unittests/frame_test.rb +0 -1
- data/unittests/hidden_test.rb +0 -1
- data/unittests/hidden_xpath_test.rb +0 -1
- data/unittests/html/blankpage.html +0 -1
- data/unittests/html/buttons1.html +0 -1
- data/unittests/html/checkboxes1.html +0 -1
- data/unittests/html/complex_table.html +0 -1
- data/unittests/html/div.html +1 -2
- data/unittests/html/fileupload.html +0 -1
- data/unittests/html/formTest1.html +0 -1
- data/unittests/html/forms2.html +0 -1
- data/unittests/html/forms3.html +0 -1
- data/unittests/html/forms4.html +0 -1
- data/unittests/html/images1.html +0 -2
- data/unittests/html/links1.html +0 -1
- data/unittests/html/popups1.html +0 -1
- data/unittests/html/radioButtons1.html +0 -1
- data/unittests/html/selectboxes1.html +0 -1
- data/unittests/html/simple_table.html +0 -1
- data/unittests/html/simple_table_columns.html +0 -1
- data/unittests/html/table1.html +0 -3
- data/unittests/html/textfields1.html +0 -1
- data/unittests/images_test.rb +0 -1
- data/unittests/images_xpath_test.rb +0 -1
- data/unittests/links_test.rb +0 -1
- data/unittests/links_xpath_test.rb +0 -1
- data/unittests/pre_test.rb +0 -1
- data/unittests/radios_test.rb +0 -1
- data/unittests/radios_xpath_test.rb +0 -1
- data/unittests/redirect_test.rb +0 -1
- data/unittests/selectbox_test.rb +0 -1
- data/unittests/selectbox_xpath_test.rb +0 -1
- data/unittests/setup.rb +1 -1
- data/unittests/table_test.rb +0 -1
- data/unittests/table_xpath_test.rb +0 -1
- data/unittests/textfields_test.rb +0 -1
- data/unittests/textfields_xpath_test.rb +0 -1
- metadata +16 -12
data/CHANGES
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
== Version 1.6.7 - 2010/10/21
|
2
|
+
|
3
|
+
=== General improvements
|
4
|
+
|
5
|
+
* added new waiting methods on Watir::Element: #when_present, #wait_until_present and #wait_while_present (Jari Bakken and Jarmo Pertman)
|
6
|
+
* added new waiting methods on Watir::IE and Watir::Firefox: #wait_until and #wait_while (Jari Bakken and Jarmo Pertman)
|
7
|
+
* added method #present? for Watir::Element (Jari Bakken and Jarmo Pertman)
|
8
|
+
* deprecated old waiting methods in Watir::Waiter which will be removed in some future version - use Watir::Wait instead (Jarmo Pertman)
|
9
|
+
|
10
|
+
=== IE improvements
|
11
|
+
|
12
|
+
* removed Watir::Simple (Željko Filipin)
|
13
|
+
* #click_no_wait was not working with frame elements. Closes http://jira.openqa.org/browse/WTR-459 (Jarmo Pertman)
|
14
|
+
|
15
|
+
=== Firefox improvements
|
16
|
+
|
17
|
+
* get_attribute_value now works with attributes named something like "foo-bar" (Alan Shields)
|
18
|
+
|
19
|
+
=== Cleanup & Maintenance
|
20
|
+
|
21
|
+
* cleaned up repo at GitHub
|
22
|
+
* merge licenses into one (Željko Filipin)
|
23
|
+
* Rakefile works now under non-Windows systems too (Alan Shields)
|
24
|
+
* Removed datahandler.rb
|
25
|
+
|
26
|
+
|
27
|
+
Whole Changelog is available at http://github.com/bret/watir/compare/v1.6.6...v1.6.7
|
28
|
+
|
29
|
+
|
1
30
|
== Version 1.6.6 - 2010/10/2
|
2
31
|
|
3
32
|
=== IE improvements
|
data/LICENSE
CHANGED
@@ -1,32 +1,34 @@
|
|
1
1
|
---------------------------------------------------------------------------
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
software
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
OR
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
2
|
+
Copyright (c) 2004 - 2006, Paul Rogers
|
3
|
+
Copyright (c) 2006 - 2007, Angrez Singh
|
4
|
+
Copyright (c) 2004 - 2010, Bret Pettichord
|
5
|
+
All rights reserved.
|
6
|
+
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
8
|
+
modification, are permitted provided that the following conditions are met:
|
9
|
+
|
10
|
+
1. Redistributions of source code must retain the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer.
|
12
|
+
|
13
|
+
2. Redistributions in binary form must reproduce the above copyright
|
14
|
+
notice, this list of conditions and the following disclaimer in the
|
15
|
+
documentation and/or other materials provided with the distribution.
|
16
|
+
|
17
|
+
3. Neither the names Paul Rogers, nor Bret Pettichord, nor Angrez Singh nor the names of any
|
18
|
+
other contributors to this software may be used to endorse or promote
|
19
|
+
products derived from this software without specific prior written
|
20
|
+
permission.
|
21
|
+
|
22
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
23
|
+
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
24
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
25
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
26
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
27
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
28
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
29
|
+
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
30
|
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
31
|
+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
32
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
|
+
--------------------------------------------------------------------------
|
34
|
+
(based on BSD Open Source License)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.7.rc1
|
data/firewatir.gemspec
CHANGED
@@ -10,11 +10,12 @@ $__firewatir_source_patterns = [
|
|
10
10
|
'rakefile.rb',
|
11
11
|
'VERSION',
|
12
12
|
'firewatir.gemspec',
|
13
|
-
"README.rdoc"
|
13
|
+
"README.rdoc",
|
14
|
+
'LICENSE'
|
14
15
|
]
|
15
16
|
|
16
17
|
spec = Gem::Specification.new do |s|
|
17
|
-
version = File.read(
|
18
|
+
version = File.exist?('VERSION') ? File.read('VERSION').strip : "0.0.0"
|
18
19
|
s.name = 'firewatir'
|
19
20
|
s.version = version
|
20
21
|
s.summary = 'Automated testing tool for web applications using Firefox browser.'
|
data/lib/firewatir/element.rb
CHANGED
@@ -2,6 +2,7 @@ module FireWatir
|
|
2
2
|
# Base class for html elements.
|
3
3
|
# This is not a class that users would normally access.
|
4
4
|
class Element
|
5
|
+
include Watir::ElementExtensions
|
5
6
|
include FireWatir::Container
|
6
7
|
# Number of spaces that separate the property from the value in the to_s method
|
7
8
|
TO_S_SIZE = 14
|
@@ -91,12 +92,16 @@ module FireWatir
|
|
91
92
|
when "url", "href", "src", "action", "name"
|
92
93
|
return_value = js_eval_method("getAttribute(\"#{attribute_name}\")")
|
93
94
|
else
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
if valid_js_identifier? attribute_name
|
96
|
+
jssh_command = "var attribute = '';
|
97
|
+
if(#{element_object}.#{attribute_name} != undefined)
|
98
|
+
attribute = #{element_object}.#{attribute_name};
|
99
|
+
else
|
100
|
+
attribute = #{element_object}.getAttribute(\"#{attribute_name}\");
|
101
|
+
attribute;"
|
102
|
+
else
|
103
|
+
jssh_command = "var attribute = ''; attribute = #{element_object}.getAttribute(\"#{attribute_name}\"); attribute;"
|
104
|
+
end
|
100
105
|
return_value = js_eval(jssh_command)
|
101
106
|
end
|
102
107
|
if attribute_name == "value"
|
@@ -1362,4 +1367,4 @@ module FireWatir
|
|
1362
1367
|
end
|
1363
1368
|
|
1364
1369
|
end # Element
|
1365
|
-
end # FireWatir
|
1370
|
+
end # FireWatir
|
data/lib/firewatir/firefox.rb
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
module JsshSocket
|
2
|
+
# Determine if str is a valid identifier in Javascript
|
3
|
+
# This is NOT a full validation - it will mess up on unicode. Sorry.
|
4
|
+
# See Section 7.6 of the ECMA-262 spec
|
5
|
+
def valid_js_identifier?(str)
|
6
|
+
/\A[a-z$_][a-z0-9]*\Z/i.match(str)
|
7
|
+
end
|
8
|
+
|
2
9
|
# Evaluate javascript and return result. Raise an exception if an error occurred.
|
3
10
|
def js_eval(str)
|
4
11
|
str.gsub!("\n", "")
|
@@ -98,4 +105,4 @@ module JsshSocket
|
|
98
105
|
#puts "return value is : #{return_value}"
|
99
106
|
return return_value
|
100
107
|
end
|
101
|
-
end
|
108
|
+
end
|
data/lib/firewatir.rb
CHANGED
@@ -4,6 +4,7 @@ require 'socket'
|
|
4
4
|
gem 'activesupport', '=2.3.9'
|
5
5
|
require 'active_support'
|
6
6
|
|
7
|
+
require 'watir'
|
7
8
|
require 'firewatir/exceptions'
|
8
9
|
require 'firewatir/jssh_socket'
|
9
10
|
require 'firewatir/container'
|
@@ -29,10 +30,7 @@ require "firewatir/elements/file_field"
|
|
29
30
|
require "firewatir/elements/radio_check_common"
|
30
31
|
require "firewatir/element_collections"
|
31
32
|
|
32
|
-
require 'watir/matches'
|
33
33
|
require 'firewatir/firefox'
|
34
|
-
require 'watir'
|
35
|
-
|
36
34
|
|
37
35
|
#--
|
38
36
|
# this only has an effect if firewatir is required before anyone invokes
|
data/unittests/bug_fixes_test.rb
CHANGED
@@ -103,6 +103,11 @@ class TC_Bugs< Test::Unit::TestCase
|
|
103
103
|
assert_false(browser.contains_text(/pass/))
|
104
104
|
end
|
105
105
|
|
106
|
+
def test_attribute_name_fails_with_hyphen
|
107
|
+
goto_page("div.html")
|
108
|
+
assert("attribute2", browser.div(:id, "div1").attribute("data-html5-attribute"))
|
109
|
+
end
|
110
|
+
|
106
111
|
tag_method :test_frame_bug_21, :fails_on_ie
|
107
112
|
def test_frame_bug_21
|
108
113
|
goto_page("frame_buttons.html")
|
data/unittests/checkbox_test.rb
CHANGED
data/unittests/div_test.rb
CHANGED
data/unittests/ff_test.rb
CHANGED
data/unittests/filefield_test.rb
CHANGED
data/unittests/form_test.rb
CHANGED
data/unittests/frame_test.rb
CHANGED
data/unittests/hidden_test.rb
CHANGED
data/unittests/html/div.html
CHANGED
@@ -5,10 +5,9 @@
|
|
5
5
|
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
6
6
|
</head>
|
7
7
|
<body>
|
8
|
-
CVS Revision: "$Revision: 1.0 $"
|
9
8
|
<br>
|
10
9
|
<br>
|
11
|
-
<div id="div1" title="Test1" attribute="attribute" ondblclick="javascript: window.location.href='pass.html';">This text is in a div with an id of div1 and title of test1</div>
|
10
|
+
<div id="div1" title="Test1" attribute="attribute" data-html5-attribute="attribute2" ondblclick="javascript: window.location.href='pass.html';">This text is in a div with an id of div1 and title of test1</div>
|
12
11
|
<br>
|
13
12
|
<div id="div2" class="blueText">This text is in a div with an id of div2</div>
|
14
13
|
<br>
|
data/unittests/html/forms2.html
CHANGED
data/unittests/html/forms3.html
CHANGED
data/unittests/html/forms4.html
CHANGED
data/unittests/html/images1.html
CHANGED
data/unittests/html/links1.html
CHANGED
data/unittests/html/popups1.html
CHANGED
data/unittests/html/table1.html
CHANGED
data/unittests/images_test.rb
CHANGED
data/unittests/links_test.rb
CHANGED
data/unittests/pre_test.rb
CHANGED
data/unittests/radios_test.rb
CHANGED
data/unittests/redirect_test.rb
CHANGED
data/unittests/selectbox_test.rb
CHANGED
data/unittests/setup.rb
CHANGED
@@ -5,7 +5,7 @@ $myDir = File.expand_path(File.dirname(__FILE__))
|
|
5
5
|
topdir = File.join(File.dirname(__FILE__), '..')
|
6
6
|
$firewatir_dev_lib = File.join(topdir, 'lib')
|
7
7
|
$watir_dev_lib = File.join(topdir, '..', 'watir', 'lib')
|
8
|
-
commonwatir_dir = "commonwatir-#{File.read(
|
8
|
+
commonwatir_dir = "commonwatir#{File.exist?('VERSION') ? "-#{File.read('VERSION').strip}" : ""}"
|
9
9
|
libs = []
|
10
10
|
libs << File.join(topdir, '..', commonwatir_dir, 'lib')
|
11
11
|
libs << File.join(topdir, '..', commonwatir_dir) # for the unit tests
|
data/unittests/table_test.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firewatir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 977940594
|
5
|
+
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
|
9
|
+
- 7
|
10
|
+
- rc1
|
11
|
+
version: 1.6.7.rc1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Angrez Singh
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-10-
|
19
|
+
date: 2010-10-21 00:00:00 -06:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +27,13 @@ dependencies:
|
|
26
27
|
requirements:
|
27
28
|
- - "="
|
28
29
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
30
|
+
hash: 977940594
|
30
31
|
segments:
|
31
32
|
- 1
|
32
33
|
- 6
|
33
|
-
-
|
34
|
-
|
34
|
+
- 7
|
35
|
+
- rc1
|
36
|
+
version: 1.6.7.rc1
|
35
37
|
type: :runtime
|
36
38
|
version_requirements: *id001
|
37
39
|
- !ruby/object:Gem::Dependency
|
@@ -208,12 +210,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
208
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
211
|
none: false
|
210
212
|
requirements:
|
211
|
-
- - "
|
213
|
+
- - ">"
|
212
214
|
- !ruby/object:Gem::Version
|
213
|
-
hash:
|
215
|
+
hash: 25
|
214
216
|
segments:
|
215
|
-
-
|
216
|
-
|
217
|
+
- 1
|
218
|
+
- 3
|
219
|
+
- 1
|
220
|
+
version: 1.3.1
|
217
221
|
requirements:
|
218
222
|
- Mozilla Firefox browser 1.5 or later.
|
219
223
|
rubyforge_project: Watir
|