firewatir 1.7.1 → 1.8.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,15 @@
1
+ == Version X.X.X - 2011/XX/XX
2
+
3
+ === IE improvements
4
+
5
+ * Improved speed of #click_no_wait by not loading RubyGems (Jarmo Pertman)
6
+ * Added check to maxlength so we don't clobber any incoming js events. (Charley Baker)
7
+
8
+ === Firefox improvements
9
+
10
+ * Removed dependency for ActiveSupport, making it possible to use FireWatir with Rails 3 (Jarmo Pertman)
11
+ * Removed :waitTime option and try to handle better firefox startup (Jarmo Pertman)
12
+
1
13
  == Version 1.7.1 - 2011/01/10
2
14
 
3
15
  === IE improvements
@@ -18,6 +30,8 @@ Whole Changelog is available at http://github.com/bret/watir/compare/v1.7.1...v1
18
30
  * IE#wait waits now again until browser has a state of READYSTATE_COMPLETE due to strange timing issues. Closes http://jira.openqa.org/browse/WTR-466 (Jarmo Pertman)
19
31
  * Added CSS3 selectors with usage like browser.text_field(:css => "input[name='text1']") (Jonas Tingeborn)
20
32
  * Updated bundled version of AutoIt to 3.3.6.1. Closes http://jira.openqa.org/browse/WTR-440 (Jarmo Pertman)
33
+ Note: If you want to use this version of AutoIt, you'll need to manually uninstall all previously installed Watir and possibly manually installed AutoIt versions first.
34
+ When you run your Watir scripts, it will automatically install and use the new version.
21
35
 
22
36
  === Firefox improvements
23
37
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.1
1
+ 1.8.0.rc1
data/firewatir.gemspec CHANGED
@@ -38,7 +38,6 @@ spec = Gem::Specification.new do |s|
38
38
  s.require_path = 'lib'
39
39
 
40
40
  s.add_dependency 'commonwatir', '= ' + version
41
- s.add_dependency 'activesupport', '=2.3.9'
42
41
 
43
42
  s.has_rdoc = true
44
43
  s.rdoc_options <<
data/lib/firewatir.rb CHANGED
@@ -1,9 +1,6 @@
1
1
  $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
2
2
 
3
3
  require 'socket'
4
- gem 'activesupport', '=2.3.9'
5
- require 'active_support'
6
-
7
4
  require 'watir'
8
5
  require 'firewatir/exceptions'
9
6
  require 'firewatir/jssh_socket'
@@ -16,9 +16,6 @@ module FireWatir
16
16
  #
17
17
  # Input:
18
18
  # options - Hash of any of the following options:
19
- # :waitTime - Time to wait for Firefox to start. By default it waits for 2 seconds.
20
- # This is done because if Firefox is not started and we try to connect
21
- # to jssh on port 9997 an exception is thrown.
22
19
  # :profile - The Firefox profile to use. If none is specified, Firefox will use
23
20
  # the last used profile.
24
21
  # :suppress_launch_process - do not create a new firefox process. Connect to an existing one.
@@ -26,21 +23,17 @@ module FireWatir
26
23
  # TODO: Start the firefox version given by user.
27
24
 
28
25
  def initialize(options = {})
29
- if(options.kind_of?(Integer))
30
- options = {:waitTime => options}
31
- end
32
-
33
- # check for jssh not running, firefox may be open but not with -jssh
34
- # if its not open at all, regardless of the :suppress_launch_process option start it
35
- # error if running without jssh, we don't want to kill their current window (mac only)
36
- jssh_down = false
37
- begin
38
- set_defaults()
39
- rescue Watir::Exception::UnableToStartJSShException
40
- jssh_down = true
41
- end
42
-
43
26
  if current_os == :macosx && !%x{ps x | grep firefox-bin | grep -v grep}.empty?
27
+ # check for jssh not running, firefox may be open but not with -jssh
28
+ # if its not open at all, regardless of the :suppress_launch_process option start it
29
+ # error if running without jssh, we don't want to kill their current window (mac only)
30
+ jssh_down = false
31
+ begin
32
+ set_defaults()
33
+ rescue Watir::Exception::UnableToStartJSShException
34
+ jssh_down = true
35
+ end
36
+
44
37
  raise "Firefox is running without -jssh" if jssh_down
45
38
  open_window unless options[:suppress_launch_process]
46
39
  elsif not options[:suppress_launch_process]
@@ -70,8 +63,6 @@ module FireWatir
70
63
 
71
64
  bin = path_to_bin()
72
65
  @t = Thread.new { system("#{bin} -jssh #{profile_opt}") }
73
- sleep options[:waitTime] || 2
74
-
75
66
  end
76
67
  private :launch_browser
77
68
 
@@ -144,7 +135,8 @@ module FireWatir
144
135
  private
145
136
  # This function creates a new socket at port 9997 and sets the default values for instance and class variables.
146
137
  # Generatesi UnableToStartJSShException if cannot connect to jssh even after 3 tries.
147
- def set_defaults(no_of_tries = 0)
138
+ def set_defaults
139
+ no_of_tries = 0
148
140
  # JSSH listens on port 9997. Create a new socket to connect to port 9997.
149
141
  begin
150
142
  $jssh_socket = TCPSocket::new(MACHINE_IP, "9997")
@@ -152,7 +144,8 @@ module FireWatir
152
144
  read_socket()
153
145
  rescue
154
146
  no_of_tries += 1
155
- retry if no_of_tries < 3
147
+ sleep 1
148
+ retry if no_of_tries < 10
156
149
  raise UnableToStartJSShException, "Unable to connect to machine : #{MACHINE_IP} on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option"
157
150
  end
158
151
  @error_checkers = []
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: 9
5
- prerelease: false
4
+ hash: 977940510
5
+ prerelease: true
6
6
  segments:
7
7
  - 1
8
- - 7
9
- - 1
10
- version: 1.7.1
8
+ - 8
9
+ - 0
10
+ - rc1
11
+ version: 1.8.0.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: 2011-01-10 00:00:00 +02:00
19
+ date: 2011-02-25 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -26,30 +27,15 @@ dependencies:
26
27
  requirements:
27
28
  - - "="
28
29
  - !ruby/object:Gem::Version
29
- hash: 9
30
+ hash: 977940510
30
31
  segments:
31
32
  - 1
32
- - 7
33
- - 1
34
- version: 1.7.1
33
+ - 8
34
+ - 0
35
+ - rc1
36
+ version: 1.8.0.rc1
35
37
  type: :runtime
36
38
  version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: activesupport
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - "="
44
- - !ruby/object:Gem::Version
45
- hash: 17
46
- segments:
47
- - 2
48
- - 3
49
- - 9
50
- version: 2.3.9
51
- type: :runtime
52
- version_requirements: *id002
53
39
  description: " FireWatir stands for \"Web Application Testing in Ruby for Firefox\". FireWatir (pronounced firewater) is a free, \n open-source functional testing tool for automating browser-based tests of web applications. \n It works with applications written in any language.\n FireWatir drives the Firefox browser the same way an end user would. \n It clicks links, fills in forms, presses buttons. \n FireWatir also checks results, such as whether expected text appears on the page, or whether a control is enabled.\n FireWatir is a Ruby library that works with Firefox on Windows. It also works on Linux, Mac but without support for\n JavaScript popups (currently support will be there shortly).\n"
54
40
  email: watir-general@googlegroups.com
55
41
  executables: []
@@ -211,12 +197,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
197
  required_rubygems_version: !ruby/object:Gem::Requirement
212
198
  none: false
213
199
  requirements:
214
- - - ">="
200
+ - - ">"
215
201
  - !ruby/object:Gem::Version
216
- hash: 3
202
+ hash: 25
217
203
  segments:
218
- - 0
219
- version: "0"
204
+ - 1
205
+ - 3
206
+ - 1
207
+ version: 1.3.1
220
208
  requirements:
221
209
  - Mozilla Firefox browser 1.5 or later.
222
210
  rubyforge_project: Watir