watir 1.6.6.rc2 → 1.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -1
- data/README.rdoc +101 -0
- data/VERSION +1 -1
- data/watir-rdoc.rb +2 -2
- data/watir.gemspec +2 -1
- metadata +16 -23
- data/lib/changes.rb +0 -3
- data/lib/license.rb +0 -38
- data/lib/readme.rb +0 -140
data/CHANGES
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
== Version 1.6.6 - 2010/
|
1
|
+
== Version 1.6.6 - 2010/10/2
|
2
2
|
|
3
3
|
=== IE improvements
|
4
4
|
|
@@ -25,9 +25,11 @@
|
|
25
25
|
=== Cleanup & Maintenance
|
26
26
|
|
27
27
|
* Some rdoc cleanup (marekj)
|
28
|
+
* README changes (Željko Filipin)
|
28
29
|
* Removed Watir::Utils (Jarmo Pertman)
|
29
30
|
* It is now possible to execute unit-tests within gems with `rake test` (Jarmo Pertman)
|
30
31
|
* Don't output unnecessary information to stdout in FireWatir unit-tests (Željko Filipin)
|
32
|
+
* Update the 3 gem projects to each use the common readme file (Bret)
|
31
33
|
|
32
34
|
|
33
35
|
Whole Changelog is available at http://github.com/bret/watir/compare/v1.6.5...v1.6.6
|
data/README.rdoc
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
= Watir
|
2
|
+
|
3
|
+
Watir, pronounced water, is an open-source (BSD) family of Ruby libraries for automating web browsers. It supports your app no matter what technology it is developed in. They support Internet Explorer on Windows, Firefox and Chrome on Windows, Mac and Linux and Safari on Mac.
|
4
|
+
|
5
|
+
Project Home:: http://watir.com
|
6
|
+
Source Code:: http://github.com/bret/watir
|
7
|
+
Support:: http://watir.com/support
|
8
|
+
Gem:: https://rubygems.org/gems/watir
|
9
|
+
Gem:: https://rubygems.org/gems/firewatir
|
10
|
+
Gem:: https://rubygems.org/gems/commonwatir
|
11
|
+
Gem:: https://rubygems.org/gems/safariwatir
|
12
|
+
Gem:: https://rubygems.org/gems/watir-webdriver
|
13
|
+
Gem:: https://rubygems.org/gems/celerity
|
14
|
+
|
15
|
+
== Install
|
16
|
+
|
17
|
+
You have to install Ruby and RubyGems first. To be able to drive Firefox you have to install Firefox add-on. Detailed installation instructions are at http://watir.com/installation
|
18
|
+
|
19
|
+
=== Windows
|
20
|
+
|
21
|
+
To install Internet Explorer and Firefox driver:
|
22
|
+
|
23
|
+
gem update --system
|
24
|
+
gem install watir
|
25
|
+
|
26
|
+
=== Mac
|
27
|
+
|
28
|
+
To install Firefox driver:
|
29
|
+
|
30
|
+
sudo gem update --system
|
31
|
+
sudo gem install firewatir
|
32
|
+
|
33
|
+
To install Safari driver, you have to install Xcode first and then:
|
34
|
+
|
35
|
+
sudo gem install rb-appscript
|
36
|
+
sudo gem install safariwatir
|
37
|
+
|
38
|
+
=== Linux
|
39
|
+
|
40
|
+
To install Firefox driver:
|
41
|
+
|
42
|
+
sudo gem update --system
|
43
|
+
sudo gem install firewatir
|
44
|
+
|
45
|
+
== Examples
|
46
|
+
|
47
|
+
Some examples from http://watir.com/examples
|
48
|
+
|
49
|
+
Including Watir gem to drive Internet Explorer on Windows
|
50
|
+
|
51
|
+
require 'watir'
|
52
|
+
|
53
|
+
Including FireWatir gem to drive Firefox on Windows/Mac/Linux
|
54
|
+
|
55
|
+
require 'firewatir'
|
56
|
+
|
57
|
+
Starting a new browser & and going to our site
|
58
|
+
|
59
|
+
browser = Watir::Browser.new
|
60
|
+
browser.goto("http://bit.ly/watir-example")
|
61
|
+
|
62
|
+
Setting a text field
|
63
|
+
|
64
|
+
browser.text_field(:name => "entry.0.single").set "Watir"
|
65
|
+
|
66
|
+
Setting a multi-line text box
|
67
|
+
|
68
|
+
browser.text_field(:name => "entry.1.single").set "I come here from Australia. \n The weather is great here."
|
69
|
+
|
70
|
+
Setting and clearing a radio button
|
71
|
+
|
72
|
+
browser.radio(:value => "watir").set
|
73
|
+
browser.radio(:value => "watir".clear
|
74
|
+
|
75
|
+
Setting and clearing check boxes
|
76
|
+
|
77
|
+
browser.checkbox(:value => "Ruby").set
|
78
|
+
browser.checkbox(:value => "Python").set
|
79
|
+
browser.checkbox(:value => "Python").clear
|
80
|
+
|
81
|
+
Clicking a button
|
82
|
+
|
83
|
+
browser.button(:name => "logon").click
|
84
|
+
|
85
|
+
Clearing, getting and selecting selection list values
|
86
|
+
|
87
|
+
browser.select_list(:name => "entry.6.single").clear
|
88
|
+
puts browser.select_list(:name => "entry.6.single").options
|
89
|
+
browser.select_list(:name => "entry.6.single").select "Chrome"
|
90
|
+
|
91
|
+
Clicking a button
|
92
|
+
|
93
|
+
browser.button(:name => "submit").click
|
94
|
+
|
95
|
+
Checking for text in a page
|
96
|
+
|
97
|
+
puts browser.text.include? "Your response has been recorded."
|
98
|
+
|
99
|
+
Checking the title of a page
|
100
|
+
|
101
|
+
puts browser.title == "Thanks!"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.6
|
1
|
+
1.6.6
|
data/watir-rdoc.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$WATIR_RDOC_OPTIONS = [] <<
|
2
2
|
'--title' << 'Watir API Reference' <<
|
3
3
|
'--accessor' << 'def_wrap=R,def_wrap_guard=R,def_creator=R,def_creator_with_default=R' <<
|
4
|
-
'--main' << '
|
4
|
+
'--main' << 'README.rdoc' <<
|
5
5
|
'--exclude' << 'unittests|camel_case.rb'
|
6
|
-
$WATIR_EXTRA_RDOC_FILES = ['
|
6
|
+
$WATIR_EXTRA_RDOC_FILES = ['README.rdoc']
|
7
7
|
|
data/watir.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'watir-rdoc'
|
2
2
|
|
3
3
|
$__watir_source_patterns = [
|
4
|
-
'CHANGES', 'rakefile.rb', 'VERSION', 'watir.gemspec', 'watir-rdoc.rb',
|
4
|
+
'CHANGES', 'rakefile.rb', 'VERSION', "README.rdoc", 'watir.gemspec', 'watir-rdoc.rb',
|
5
5
|
'lib/watir/*.rb', 'lib/watir/AutoItX3.dll',
|
6
6
|
'unittests/*.rb', 'unittests/html/*.html', 'unittests/html/images/*.*',
|
7
7
|
'unittests/other/*.rb', 'unittests/testcase/*.rb', 'unittests/windows/*.rb',
|
@@ -42,6 +42,7 @@ spec = Gem::Specification.new do |s|
|
|
42
42
|
|
43
43
|
s.has_rdoc = true
|
44
44
|
s.rdoc_options += $WATIR_RDOC_OPTIONS
|
45
|
+
s.extra_rdoc_files = $WATIR_EXTRA_RDOC_FILES
|
45
46
|
s.executables << 'watir-console'
|
46
47
|
|
47
48
|
# s.test_file = 'unittests/core_tests.rb'
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 3
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 6
|
9
9
|
- 6
|
10
|
-
|
11
|
-
version: 1.6.6.rc2
|
10
|
+
version: 1.6.6
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Bret Pettichord
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-
|
18
|
+
date: 2010-10-02 00:00:00 -06:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -59,13 +58,12 @@ dependencies:
|
|
59
58
|
requirements:
|
60
59
|
- - "="
|
61
60
|
- !ruby/object:Gem::Version
|
62
|
-
hash:
|
61
|
+
hash: 3
|
63
62
|
segments:
|
64
63
|
- 1
|
65
64
|
- 6
|
66
65
|
- 6
|
67
|
-
|
68
|
-
version: 1.6.6.rc2
|
66
|
+
version: 1.6.6
|
69
67
|
type: :runtime
|
70
68
|
version_requirements: *id003
|
71
69
|
- !ruby/object:Gem::Dependency
|
@@ -76,13 +74,12 @@ dependencies:
|
|
76
74
|
requirements:
|
77
75
|
- - "="
|
78
76
|
- !ruby/object:Gem::Version
|
79
|
-
hash:
|
77
|
+
hash: 3
|
80
78
|
segments:
|
81
79
|
- 1
|
82
80
|
- 6
|
83
81
|
- 6
|
84
|
-
|
85
|
-
version: 1.6.6.rc2
|
82
|
+
version: 1.6.6
|
86
83
|
type: :runtime
|
87
84
|
version_requirements: *id004
|
88
85
|
- !ruby/object:Gem::Dependency
|
@@ -105,12 +102,13 @@ executables:
|
|
105
102
|
- watir-console
|
106
103
|
extensions: []
|
107
104
|
|
108
|
-
extra_rdoc_files:
|
109
|
-
|
105
|
+
extra_rdoc_files:
|
106
|
+
- README.rdoc
|
110
107
|
files:
|
111
108
|
- CHANGES
|
112
109
|
- rakefile.rb
|
113
110
|
- VERSION
|
111
|
+
- README.rdoc
|
114
112
|
- watir.gemspec
|
115
113
|
- watir-rdoc.rb
|
116
114
|
- lib/watir/camel_case.rb
|
@@ -304,9 +302,6 @@ files:
|
|
304
302
|
- lib/watir/contrib/enabled_popup.rb
|
305
303
|
- lib/watir/contrib/ie-new-process.rb
|
306
304
|
- lib/watir/contrib/page_checker.rb
|
307
|
-
- lib/readme.rb
|
308
|
-
- lib/changes.rb
|
309
|
-
- lib/license.rb
|
310
305
|
- bin/watir-console
|
311
306
|
has_rdoc: true
|
312
307
|
homepage: http://www.watir.com/
|
@@ -319,7 +314,7 @@ rdoc_options:
|
|
319
314
|
- --accessor
|
320
315
|
- def_wrap=R,def_wrap_guard=R,def_creator=R,def_creator_with_default=R
|
321
316
|
- --main
|
322
|
-
-
|
317
|
+
- README.rdoc
|
323
318
|
- --exclude
|
324
319
|
- unittests|camel_case.rb
|
325
320
|
require_paths:
|
@@ -336,14 +331,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
336
331
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
337
332
|
none: false
|
338
333
|
requirements:
|
339
|
-
- - "
|
334
|
+
- - ">="
|
340
335
|
- !ruby/object:Gem::Version
|
341
|
-
hash:
|
336
|
+
hash: 3
|
342
337
|
segments:
|
343
|
-
-
|
344
|
-
|
345
|
-
- 1
|
346
|
-
version: 1.3.1
|
338
|
+
- 0
|
339
|
+
version: "0"
|
347
340
|
requirements:
|
348
341
|
- Microsoft Windows running Internet Explorer 5.5 or later.
|
349
342
|
rubyforge_project: Watir
|
data/lib/changes.rb
DELETED
data/lib/license.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
=begin rdoc
|
2
|
-
|
3
|
-
License
|
4
|
-
---------------------------------------------------------------------------
|
5
|
-
Copyright (c) 2004 - 2005, Paul Rogers and Bret Pettichord
|
6
|
-
Copyright (c) 2006 - 2008, Bret Pettichord
|
7
|
-
All rights reserved.
|
8
|
-
|
9
|
-
Redistribution and use in source and binary forms, with or without
|
10
|
-
modification, are permitted provided that the following conditions are met:
|
11
|
-
|
12
|
-
1. Redistributions of source code must retain the above copyright notice,
|
13
|
-
this list of conditions and the following disclaimer.
|
14
|
-
|
15
|
-
2. Redistributions in binary form must reproduce the above copyright
|
16
|
-
notice, this list of conditions and the following disclaimer in the
|
17
|
-
documentation and/or other materials provided with the distribution.
|
18
|
-
|
19
|
-
3. Neither the names Paul Rogers, Bret Pettichord nor the names of contributors to
|
20
|
-
this software may be used to endorse or promote products derived from this
|
21
|
-
software without specific prior written permission.
|
22
|
-
|
23
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
24
|
-
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
26
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
27
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
28
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
29
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
30
|
-
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
31
|
-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
32
|
-
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
33
|
-
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
-
--------------------------------------------------------------------------
|
35
|
-
(based on BSD Open Source License)
|
36
|
-
|
37
|
-
=end
|
38
|
-
|
data/lib/readme.rb
DELETED
@@ -1,140 +0,0 @@
|
|
1
|
-
=begin rdoc
|
2
|
-
|
3
|
-
This is Watir - Web Application Testing In Ruby http://wtr.rubyforge.org
|
4
|
-
|
5
|
-
Install Ruby http://ruby-lang.org
|
6
|
-
First you need to install Ruby using the one-click installer for Windows. We
|
7
|
-
recommend Ruby 1.8.6. (Even if you are using modal dialogs.)
|
8
|
-
|
9
|
-
Install Watir
|
10
|
-
Watir is packaged as a gem, a Ruby library that can be installed over the
|
11
|
-
internet.
|
12
|
-
|
13
|
-
Watir 1.5 was released in September 2007. To install it, type this at a
|
14
|
-
command prompt:
|
15
|
-
gem install watir
|
16
|
-
|
17
|
-
Watir 1.4 was released in August 2005. If you are upgrading from it, see
|
18
|
-
these notes: http://wiki.openqa.org/display/WTR/Development+Builds
|
19
|
-
|
20
|
-
How To Use:
|
21
|
-
This only works on Windows.
|
22
|
-
Requires Internet Explorer 5.5 or newer.
|
23
|
-
Check out the mail lists and the documentation for the workarounds.
|
24
|
-
|
25
|
-
User Guide: http://wiki.openqa.org/display/WTR/User+Guide
|
26
|
-
|
27
|
-
Unit Tests:
|
28
|
-
Run the unittests in a cmd shell. Go to the dir where you installed it and then type 'ruby unittests/core_tests.rb'.
|
29
|
-
See the user guide if you are having problems with security blocking.
|
30
|
-
|
31
|
-
Typical Usage
|
32
|
-
# include the controller
|
33
|
-
require 'watir'
|
34
|
-
# create an instance of the controller
|
35
|
-
ie = Watir::IE.new
|
36
|
-
# go to the page you want to test
|
37
|
-
ie.goto('http://myserver/mypage')
|
38
|
-
# to enter text into a text field - assuming the field is named 'username'
|
39
|
-
ie.text_field(:name, 'username').set('Paul')
|
40
|
-
# if there was a text field that had an id of 'company_ID', you could set it to 'Ruby Co':
|
41
|
-
ie.text_field(:id ,'company_ID').set('Ruby Co')
|
42
|
-
# to click a button that has a caption of 'Cancel'
|
43
|
-
ie.button(:value, 'Cancel').click
|
44
|
-
|
45
|
-
Identifying something using two or more identifying characteristics
|
46
|
-
# Html objects can also be identified via a combination of two of the above methods,
|
47
|
-
# for example to click a span with a class name of 'Label', and whose text is 'Add new', one could say
|
48
|
-
ie.span(:class =>'Label', :text => 'Add new').click
|
49
|
-
# Or to find one object within another (for example the first text_field within a div of class
|
50
|
-
# 'PasswordInput', where your password equals 'MyPassword'), one could say
|
51
|
-
ie.div(:class, 'PasswordInput').text_field(:index, 1).set('MyPassword')
|
52
|
-
|
53
|
-
The ways that are available to identify an html object depend upon the object type, but include
|
54
|
-
:id used for an object that has an ID attribute.*
|
55
|
-
:name used for an object that has a name attribute.*
|
56
|
-
:value value of text fields, captions of buttons.
|
57
|
-
:index finds the nth object of the specified type - eg button(:index , 2) finds the second button. This is 1 based. <br>
|
58
|
-
:class used for an object that has a class attribute.
|
59
|
-
:text used for links and other objects that contain text.
|
60
|
-
:xpath finds the item using xpath query
|
61
|
-
|
62
|
-
* :id and :name are the quickest of these to process, and so should be used when possible to speed up scripts.
|
63
|
-
|
64
|
-
These 2 web sites provide info on Internet Explorer and on the DOM as implemented by Internet Explorer
|
65
|
-
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/webbrowser.asp
|
66
|
-
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/overview/overview.asp
|
67
|
-
|
68
|
-
Command line options:
|
69
|
-
|
70
|
-
-b (background) Run Internet Explorer invisible
|
71
|
-
-f (fast) Run tests very fast
|
72
|
-
|
73
|
-
Note that if you also use test/unit, you will need to require 'watir' first to avoid conflicts
|
74
|
-
with its command line switches.
|
75
|
-
|
76
|
-
Javascript Pop Up Support
|
77
|
-
Watir now optionally installs AutoIt - http://www.autoitscript.com/
|
78
|
-
This is the prefered method for dealing wth pop ups, file requesters etc. Support for Winclickers will be removed.
|
79
|
-
|
80
|
-
Contacts:
|
81
|
-
Bret Pettichord (bret@pettichord.com)
|
82
|
-
Charley Baker (charley.baker@gmail.com)
|
83
|
-
Paul Rogers (paul.rogers@shaw.ca)
|
84
|
-
The mailing list: http://groups.google.com/group/watir-general
|
85
|
-
|
86
|
-
Contributors:
|
87
|
-
Bret Pettichord
|
88
|
-
Paul Rogers
|
89
|
-
Jonathan Kohl
|
90
|
-
Chris Morris
|
91
|
-
Karlin Fox
|
92
|
-
Lorenzo Jorquera
|
93
|
-
Atilla Ozgur
|
94
|
-
Justin McCarthy
|
95
|
-
Chris McMahon
|
96
|
-
Elisabeth Hendrickson
|
97
|
-
Michael Kelly
|
98
|
-
Peter Chau
|
99
|
-
Danny Faught
|
100
|
-
Andy Sipe
|
101
|
-
John Lloyd-Jones
|
102
|
-
Chris Hedges
|
103
|
-
Park Heesob
|
104
|
-
Shashank Date
|
105
|
-
Jared Luxenberg
|
106
|
-
Alexey Verkhovsky
|
107
|
-
Tuyet Cong-Ton-Nu
|
108
|
-
Jeff Wood
|
109
|
-
Angrez Singh
|
110
|
-
Abhishek Goliya
|
111
|
-
Yaxin Wang
|
112
|
-
Michael Bolton
|
113
|
-
Paul Carvalho
|
114
|
-
Konstantin Sobolev
|
115
|
-
David Schmidt
|
116
|
-
Dara Lillis
|
117
|
-
Charley Baker
|
118
|
-
Prema Arya
|
119
|
-
Xavier Noria
|
120
|
-
Jeff Fry
|
121
|
-
Zeljko Filipin
|
122
|
-
Paul Taylor - Bug fix 194
|
123
|
-
Vincent Xu - Chinese input support
|
124
|
-
Tomislav Car - Filefield fix (210)
|
125
|
-
Michael Hwee & Aidy Lewis - Multiple attribute support for FireWatir (233)
|
126
|
-
Alan Baird - Fix for visible? method (253)
|
127
|
-
Jari Bakken - Regexp support for includes? and selected? methods for select lists (261)
|
128
|
-
|
129
|
-
Acknowledgements:
|
130
|
-
Chris Morris
|
131
|
-
Brian Marick
|
132
|
-
Jonathan Kohl
|
133
|
-
Penny Tonita
|
134
|
-
Janet Gregory
|
135
|
-
Andy Tinkham
|
136
|
-
Jacinda Scott (logo creator)
|
137
|
-
|
138
|
-
Thanks for your ideas and support!
|
139
|
-
|
140
|
-
=end
|