watir-browser-factory 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/watir-browser-factory/browser.rb +3 -21
- data/lib/watir-browser-factory/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2749d77d8d065608653fa72770211365bb18313
|
4
|
+
data.tar.gz: 0b04ad773fe858b540d9860f85c42b67a9236e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 209eb94793e9cf74fac853a2826daaaf024f6cba094df0371c23a2e996df35ea9758dcd03d6b51e87a3cb74b30a48b7df8c3fd2b307ba9d7ef704567151fabae
|
7
|
+
data.tar.gz: 7052781c2140be9ffbe159dbc3095bdbc018ce6cad27488223bad64ffcb50a8e2330f648af5a0728f9fc101996439ffef8126f8a2b043d4ae0bc38ec3bd2c9f0
|
@@ -1,33 +1,15 @@
|
|
1
1
|
module Watir
|
2
2
|
class Browser
|
3
3
|
class << self
|
4
|
-
|
5
|
-
# Creates a Watir::Browser instance and goes to URL.
|
6
|
-
#
|
7
|
-
# @example
|
8
|
-
# browser = Watir::Browser.start "www.google.com", :chrome
|
9
|
-
# #=> #<Watir::Browser:0x..fa45a499cb41e1752 url="http://www.google.com" title="Google">
|
10
|
-
#
|
11
|
-
# @param [String] url
|
12
|
-
# @param [Symbol, Selenium::WebDriver] browser :firefox, :ie, :chrome, :remote or Selenium::WebDriver instance
|
13
|
-
# @return [Watir::Browser]
|
14
|
-
#
|
15
|
-
def start(url, browser = :firefox, *args)
|
16
|
-
b = new(browser, *args)
|
17
|
-
b.goto url
|
18
|
-
|
19
|
-
b
|
20
|
-
end
|
21
|
-
|
22
|
-
def smart_start(url,caps,*args)
|
4
|
+
def sauce_start(url,caps,*args)
|
23
5
|
# If we didn't get a platform we're assuming that we're running locally.
|
24
6
|
# Don't like how long service status takes now.
|
25
7
|
|
8
|
+
# Need to work args back in.
|
26
9
|
if caps[:platform] # && SauceWhisk::Sauce.service_status[:service_operational]
|
27
10
|
b = Watir::Browser.new(:remote,
|
28
11
|
:url => "http://#{ENV['SAUCE_USERNAME']}:#{ENV['SAUCE_ACCESS_KEY']}@ondemand.saucelabs.com:80/wd/hub",
|
29
|
-
:desired_capabilities => caps
|
30
|
-
)
|
12
|
+
:desired_capabilities => caps)
|
31
13
|
else
|
32
14
|
puts "Running locally"
|
33
15
|
b = Watir::Browser.new(:firefox)
|