selenium-client 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,7 +36,20 @@ Features
36
36
  Plain API
37
37
  =========
38
38
 
39
- Selenium client is just a plain Ruby API, so you can use it wherever you can use Ruby. For instance
39
+ Selenium client is just a plain Ruby API, so you can use it wherever you can use Ruby.
40
+
41
+ To used the new API just require the client driver:
42
+
43
+ require "rubygems"
44
+ require "selenium/client"
45
+
46
+ For a fully backward compatible API you can start with:
47
+
48
+ require "rubygems"
49
+ gem "selenium-client"
50
+ require "selenium"
51
+
52
+ For instance
40
53
  to write a little Ruby script using selenium-client you could write something like:
41
54
 
42
55
  #!/usr/bin/env ruby
@@ -45,8 +58,7 @@ Plain API
45
58
  #
46
59
  require "test/unit"
47
60
  require "rubygems"
48
- gem "selenium-client"
49
- require "selenium"
61
+ require "selenium/client"
50
62
 
51
63
  begin
52
64
  @browser = Selenium::Client::Driver.new("localhost", 4444, "*firefox", "http://www.google.com", 10000);
@@ -142,7 +154,10 @@ Start/Stop a Selenium Remote Control Server
142
154
  To leverage all selenium-client capabilities I recommend downloading a recent nightly build of
143
155
  a standalone packaging of Selenium Remote Control (great for kick-ass Safari and Firefox 3 support anyway).
144
156
  You will find the mightly build at [OpenQA.org](http://archiva.openqa.org/repository/snapshots/org/openqa/selenium/selenium-remote-control/1.0-SNAPSHOT/)
145
-
157
+
158
+ You typically "freeze" the Selenium Remote Control jar in your `vendor`
159
+ directory.
160
+
146
161
  require 'selenium/rake/tasks'
147
162
 
148
163
  Selenium::Rake::RemoteControlStartTask.new do |rc|
@@ -189,4 +204,4 @@ Grid](http://selenium-grid.openqa.org))
189
204
 
190
205
 
191
206
 
192
-
207
+
@@ -1,42 +1,11 @@
1
- # Copyright 2006 ThoughtWorks, Inc
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- #
1
+ # Legacy helper providing backward compatibility
15
2
 
16
3
  # -----------------
17
4
  # Original code by Aslak Hellesoy and Darren Hobbs
18
5
  # This file has been automatically generated via XSL
19
6
  # -----------------
20
7
 
21
- require 'net/http'
22
- require 'uri'
23
- require 'cgi'
24
- require "digest/md5"
25
- require "fileutils"
26
- require File.expand_path(File.dirname(__FILE__) + '/tcp_socket_extension')
27
- require File.expand_path(File.dirname(__FILE__) + '/nautilus/shell')
28
- require File.expand_path(File.dirname(__FILE__) + '/selenium/command_error')
29
- require File.expand_path(File.dirname(__FILE__) + '/selenium/protocol_error')
30
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/protocol')
31
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/generated_driver')
32
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/extensions')
33
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/idiomatic')
34
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/base')
35
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/driver')
36
- require File.expand_path(File.dirname(__FILE__) + '/selenium/client/selenium_helper')
37
- require File.expand_path(File.dirname(__FILE__) + '/selenium/remote_control/remote_control')
38
- require File.expand_path(File.dirname(__FILE__) + '/selenium/rake/remote_control_start_task')
39
- require File.expand_path(File.dirname(__FILE__) + '/selenium/rake/remote_control_stop_task')
8
+ require File.expand_path(File.dirname(__FILE__) + '/selenium/client')
40
9
 
41
10
  # Backward compatibility
42
11
 
@@ -0,0 +1,23 @@
1
+ #
2
+ # Helper requiring the basic selenium-client API (no RSpec goodness)
3
+ #
4
+
5
+ require 'net/http'
6
+ require 'uri'
7
+ require 'cgi'
8
+ require "digest/md5"
9
+ require "fileutils"
10
+ require File.expand_path(File.dirname(__FILE__) + '/../tcp_socket_extension')
11
+ require File.expand_path(File.dirname(__FILE__) + '/../nautilus/shell')
12
+ require File.expand_path(File.dirname(__FILE__) + '/command_error')
13
+ require File.expand_path(File.dirname(__FILE__) + '/protocol_error')
14
+ require File.expand_path(File.dirname(__FILE__) + '/client/protocol')
15
+ require File.expand_path(File.dirname(__FILE__) + '/client/generated_driver')
16
+ require File.expand_path(File.dirname(__FILE__) + '/client/extensions')
17
+ require File.expand_path(File.dirname(__FILE__) + '/client/idiomatic')
18
+ require File.expand_path(File.dirname(__FILE__) + '/client/base')
19
+ require File.expand_path(File.dirname(__FILE__) + '/client/driver')
20
+ require File.expand_path(File.dirname(__FILE__) + '/client/selenium_helper')
21
+ require File.expand_path(File.dirname(__FILE__) + '/remote_control/remote_control')
22
+ require File.expand_path(File.dirname(__FILE__) + '/rake/remote_control_start_task')
23
+ require File.expand_path(File.dirname(__FILE__) + '/rake/remote_control_stop_task')
@@ -10,7 +10,7 @@ module Selenium
10
10
  def remote_control_command(verb, args=[])
11
11
  timeout(default_timeout_in_seconds) do
12
12
  status, response = http_post(http_request_for(verb, args))
13
- raise SeleniumCommandError, response unless status == "OK"
13
+ raise Selenium::CommandError, response unless status == "OK"
14
14
  response
15
15
  end
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenQA
@@ -30,6 +30,7 @@ files:
30
30
  - lib/selenium/client/idiomatic.rb
31
31
  - lib/selenium/client/protocol.rb
32
32
  - lib/selenium/client/selenium_helper.rb
33
+ - lib/selenium/client.rb
33
34
  - lib/selenium/command_error.rb
34
35
  - lib/selenium/protocol_error.rb
35
36
  - lib/selenium/rake/remote_control_start_task.rb