jarib-celerity 0.0.5.9 → 0.0.5.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -554,16 +554,22 @@ module Celerity
554
554
  #
555
555
 
556
556
  def setup_webclient(opts)
557
- browser = case opts.delete(:browser)
558
- when :firefox then ::HtmlUnit::BrowserVersion::FIREFOX_2
559
- else ::HtmlUnit::BrowserVersion::INTERNET_EXPLORER_7_0
560
- end
557
+ browser = (opts.delete(:browser) || :internet_explorer).to_sym
558
+
559
+ case browser
560
+ when :firefox
561
+ browser_version = ::HtmlUnit::BrowserVersion::FIREFOX_2
562
+ when :internet_explorer, :ie
563
+ browser_version = ::HtmlUnit::BrowserVersion::INTERNET_EXPLORER_7_0
564
+ else
565
+ raise ArgumentError, "unknown browser: #{browser.inspect}"
566
+ end
561
567
 
562
568
  if proxy = opts.delete(:proxy)
563
569
  phost, pport = proxy.split(":")
564
- @webclient = ::HtmlUnit::WebClient.new(browser, phost, pport.to_i)
570
+ @webclient = ::HtmlUnit::WebClient.new(browser_version, phost, pport.to_i)
565
571
  else
566
- @webclient = ::HtmlUnit::WebClient.new(browser)
572
+ @webclient = ::HtmlUnit::WebClient.new(browser_version)
567
573
  end
568
574
 
569
575
  @webclient.throwExceptionOnScriptError = false unless opts.delete(:javascript_exceptions)
data/lib/celerity/util.rb CHANGED
@@ -6,6 +6,9 @@ module Celerity
6
6
  HtmlUnit::Html::HtmlAnchor => Celerity::Link,
7
7
  HtmlUnit::Html::HtmlArea => Celerity::Area,
8
8
  HtmlUnit::Html::HtmlButton => Celerity::Button,
9
+ HtmlUnit::Html::HtmlSubmitInput => Celerity::Button,
10
+ HtmlUnit::Html::HtmlResetInput => Celerity::Button,
11
+ HtmlUnit::Html::HtmlImageInput => Celerity::Button,
9
12
  HtmlUnit::Html::HtmlButtonInput => Celerity::Button,
10
13
  HtmlUnit::Html::HtmlCaption => Celerity::Button, # ?
11
14
  HtmlUnit::Html::HtmlCheckBoxInput => Celerity::CheckBox,
@@ -3,7 +3,7 @@ module Celerity #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
5
  TINY = 5
6
- PATCH = 9 # Set to nil for official release
6
+ PATCH = 10 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jarib-celerity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.9
4
+ version: 0.0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-03-05 00:00:00 -08:00
14
+ date: 2009-03-11 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,7 @@ dependencies:
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: 1.9.0
25
+ version: 1.10.0
26
26
  version:
27
27
  description: "Celerity is a JRuby wrapper around HtmlUnit \xE2\x80\x93 a headless Java browser with JavaScript support. It provides a simple API for programmatic navigation through web applications. Celerity aims at being API compatible with Watir."
28
28
  email: jari.bakken@finn.no
@@ -79,7 +79,7 @@ files:
79
79
  - lib/celerity/htmlunit/commons-logging-1.1.1.jar
80
80
  - lib/celerity/htmlunit/cssparser-0.9.5.jar
81
81
  - lib/celerity/htmlunit/htmlunit-2.5-SNAPSHOT.jar
82
- - lib/celerity/htmlunit/htmlunit-core-js-2.4.jar
82
+ - lib/celerity/htmlunit/htmlunit-core-js-2.5.jar
83
83
  - lib/celerity/htmlunit/nekohtml-1.9.12-20090216.090710-7.jar
84
84
  - lib/celerity/htmlunit/sac-1.3.jar
85
85
  - lib/celerity/htmlunit/serializer-2.7.1.jar