@@ -27,14 +27,15 @@ module Remote
27
27
class W3CCapabilities
28
28
29
29
DEFAULTS = {
30
- :browser_version => '' ,
31
- :platform_name => :any ,
32
- :platform_version => false ,
33
- :accept_ssl_certs => false ,
34
- :takes_screenshot => false ,
35
- :takes_element_screenshot => false ,
36
- :page_load_strategy => false ,
37
- :proxy => nil
30
+ :browser_name => '' ,
31
+ :browser_version => '' ,
32
+ :platform_name => :any ,
33
+ :platform_version => false ,
34
+ :accept_ssl_certs => false ,
35
+ :takes_screenshot => false ,
36
+ :takes_element_screenshot => false ,
37
+ :page_load_strategy => false ,
38
+ :proxy => nil
38
39
}
39
40
40
41
DEFAULTS . each_key do |key |
@@ -47,6 +48,8 @@ class W3CCapabilities
47
48
end
48
49
end
49
50
51
+ alias_method :version , :browser_version
52
+
50
53
#
51
54
# Convenience methods for the common choices.
52
55
#
@@ -67,6 +70,7 @@ def firefox(opts = {})
67
70
end
68
71
69
72
def w3c? ( opts = { } )
73
+ return true if opts [ :browser_name ] == :firefox_nightly
70
74
intersect = Remote ::W3CCapabilities ::DEFAULTS . keys & opts . keys
71
75
common = [ :takes_screenshot , :proxy ]
72
76
!( intersect - common ) . empty? || Firefox ::Binary . version > 43
0 commit comments