grid 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/grid.gemspec +1 -1
- data/lib/grid.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
data/grid.gemspec
CHANGED
data/lib/grid.rb
CHANGED
@@ -20,13 +20,12 @@ class Grid
|
|
20
20
|
log.level = params[:loglevel] || Logger::DEBUG
|
21
21
|
grid = Watir::Grid.new(params)
|
22
22
|
grid.start(:take_all => true)
|
23
|
-
@webdriver_browser_type = ask('Which type of browser?') { |q| q.default = "firefox" } unless params[:browser]
|
24
23
|
log.debug("Grid size : #{grid.size}")
|
25
24
|
log.debug("Grid rampup : #{rampup(grid.size, params)} secs")
|
26
25
|
threads = []
|
27
26
|
grid.browsers.each_with_index do |browser, index|
|
28
27
|
sleep rampup(grid.size, params)
|
29
|
-
threads << Thread.new do
|
28
|
+
threads << Thread.new(params[:browser]) do |webdriver_browser_type|
|
30
29
|
$stdout.flush
|
31
30
|
start = ::Time.now
|
32
31
|
log.debug("Browser #{index+1}##{Thread.current.object_id} start : #{::Time.now}")
|
@@ -34,7 +33,8 @@ class Grid
|
|
34
33
|
log.debug("Browser #{index+1}##{Thread.current.object_id} type : #{browser[:browser_type]}")
|
35
34
|
log.debug("Browser #{index+1}##{Thread.current.object_id} hostname : #{browser[:hostname]}")
|
36
35
|
if browser[:browser_type] =~ /webdriver/
|
37
|
-
|
36
|
+
webdriver_browser_type = "firefox" unless webdriver_browser_type
|
37
|
+
@browser = browser[:object].new_browser(webdriver_browser_type.to_sym)
|
38
38
|
else
|
39
39
|
@browser = browser[:object].new_browser
|
40
40
|
end
|
metadata
CHANGED