watirgrid 0.0.8.pre → 0.0.9
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/LICENSE +1 -1
- data/README.rdoc +1 -5
- data/Rakefile +11 -14
- data/bin/controller +3 -3
- data/bin/provider +3 -3
- data/examples/basic/example_safariwatir.rb +31 -0
- data/examples/basic/example_webdriver.rb +40 -0
- data/examples/basic/example_webdriver_remote.rb +34 -0
- data/examples/cucumber/example.feature +17 -0
- data/examples/cucumber/step_definitions/example_steps.rb +39 -0
- data/lib/controller.rb +0 -2
- data/lib/extensions/remote.rb +39 -0
- data/lib/extensions/selenium-server-standalone-2.0b1.jar +0 -0
- data/lib/provider.rb +10 -17
- data/lib/watirgrid.rb +0 -2
- data/logo.png +0 -0
- data/spec/grid_spec.rb +110 -54
- data/spec/spec_helper.rb +0 -6
- data/spec/utilities_spec.rb +11 -8
- data/spec/webdriver_remote_spec.rb +35 -0
- data/spec/webdriver_spec.rb +45 -59
- data/watirgrid.gemspec +19 -27
- metadata +27 -51
- data/HISTORY.rdoc +0 -18
- data/examples/find_by_uuid.rb +0 -28
- data/examples/google.rb +0 -19
- data/examples/info.rb +0 -14
- data/examples/restart_firefox.rb +0 -14
- data/examples/simple.rb +0 -19
- data/spec/spec.opts +0 -1
- data/spec/stub.rb +0 -48
- data/spec/tuples_spec.rb +0 -46
- data/spec/watir_spec.rb +0 -59
- data/spec/watirgrid_spec.rb +0 -51
data/spec/watir_spec.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
-
|
3
|
-
describe 'WatirGrid' do
|
4
|
-
before(:all) do
|
5
|
-
controller = Controller.new(
|
6
|
-
:ring_server_port => 12351,
|
7
|
-
:loglevel => Logger::ERROR)
|
8
|
-
controller.start
|
9
|
-
1.upto(1) do
|
10
|
-
provider = Provider.new(
|
11
|
-
:ring_server_port => 12351,
|
12
|
-
:loglevel => Logger::ERROR, :browser_type => 'ie')
|
13
|
-
provider.start
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'should return how many grid are available in the tuplespace' do
|
18
|
-
grid = Watir::Grid.new(:ring_server_port => 12351,
|
19
|
-
:ring_server_host => '127.0.0.1')
|
20
|
-
grid.start(:read_all => true)
|
21
|
-
grid.size.should == 1
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'should find at least one browser in the tuplespace' do
|
25
|
-
grid = Watir::Grid.new(:ring_server_port => 12351,
|
26
|
-
:ring_server_host => '127.0.0.1')
|
27
|
-
grid.start(:quantity => 1, :read_all => true)
|
28
|
-
grid.size.should == 1
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'should take the first (and last) browser and execute some watir commands' do
|
32
|
-
grid = Watir::Grid.new(:ring_server_port => 12351,
|
33
|
-
:ring_server_host => '127.0.0.1')
|
34
|
-
grid.start(:quantity => 1, :take_all => true)
|
35
|
-
threads = []
|
36
|
-
grid.browsers.each do |browser|
|
37
|
-
threads << Thread.new do
|
38
|
-
browser[:hostname].should == `hostname`.strip
|
39
|
-
browser[:architecture].should == Config::CONFIG['arch']
|
40
|
-
browser[:browser_type].should == 'ie'
|
41
|
-
b = browser[:object].new_browser
|
42
|
-
b.goto("http://www.google.com")
|
43
|
-
b.text_field(:name, 'q').set("watirgrid")
|
44
|
-
b.button(:name, "btnI").click
|
45
|
-
end
|
46
|
-
end
|
47
|
-
threads.each {|thread| thread.join}
|
48
|
-
grid.size.should == 1
|
49
|
-
end
|
50
|
-
|
51
|
-
it 'should find no more tuples in the tuplespace' do
|
52
|
-
grid = Watir::Grid.new(:ring_server_port => 12351,
|
53
|
-
:ring_server_host => '127.0.0.1')
|
54
|
-
grid.start(:read_all => true)
|
55
|
-
grid.size.should == 0
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
|
data/spec/watirgrid_spec.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
-
|
3
|
-
describe Controller do
|
4
|
-
it 'should start a DRb and Ring Server when specifying NO interface or port' do
|
5
|
-
controller = Controller.new
|
6
|
-
controller.start
|
7
|
-
controller.drb_server_uri.should =~ /druby/
|
8
|
-
controller.stop
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'should start a DRb and Ring Server on a specified interface' do
|
12
|
-
controller = Controller.new(
|
13
|
-
:drb_server_host => '127.0.0.1',
|
14
|
-
:ring_server_host => '127.0.0.1')
|
15
|
-
controller.start
|
16
|
-
controller.drb_server_uri.should =~ /druby/
|
17
|
-
controller.stop
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'should start a DRb and Ring Server on specified ports' do
|
21
|
-
controller = Controller.new(
|
22
|
-
:drb_server_port => 11235,
|
23
|
-
:ring_server_port => 12358)
|
24
|
-
controller.start
|
25
|
-
controller.drb_server_uri.should =~ /druby/
|
26
|
-
controller.stop
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe Provider do
|
31
|
-
before(:all) do
|
32
|
-
@controller = Controller.new(
|
33
|
-
:drb_server_host => '127.0.0.1',
|
34
|
-
:ring_server_host => '127.0.0.1',
|
35
|
-
:ring_server_port => 12350)
|
36
|
-
@controller.start
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'should register a new provider on a specified port' do
|
40
|
-
provider = Provider.new(
|
41
|
-
:drb_server_host => '127.0.0.1',
|
42
|
-
:ring_server_host => '127.0.0.1',
|
43
|
-
:ring_server_port => 12350)
|
44
|
-
provider.start
|
45
|
-
end
|
46
|
-
|
47
|
-
after(:all) do
|
48
|
-
@controller.stop
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|