selenium-connect 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,35 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
class Firefox
|
4
|
-
attr_reader :config, :capabilities
|
5
|
-
|
6
|
-
def initialize(config)
|
7
|
-
@config = config
|
8
|
-
set_profile
|
9
|
-
end
|
10
|
-
|
11
|
-
private
|
12
|
-
|
13
|
-
def get_profile
|
14
|
-
if config.profile_path
|
15
|
-
Selenium::WebDriver::Firefox::Profile.new config.profile_path
|
16
|
-
elsif config.profile_name
|
17
|
-
Selenium::WebDriver::Firefox::Profile.from_name config.profile_name
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def set_profile
|
22
|
-
profile = get_profile
|
23
|
-
profile.assume_untrusted_certificate_issuer = false unless profile.nil?
|
24
|
-
@capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile)
|
25
|
-
end
|
26
|
-
|
27
|
-
end #Firefox
|
28
|
-
|
29
|
-
class InternetExplorer
|
30
|
-
end #InternetExplorer
|
31
|
-
end #Runner
|
32
|
-
end #SeleniumConnect
|
1
|
+
require 'selenium-connect/runner/firefox'
|
2
|
+
require 'selenium-connect/runner/ie'
|
33
3
|
|
34
4
|
module SeleniumConnect
|
35
5
|
class Runner
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module SeleniumConnect
|
2
|
+
class Runner
|
3
|
+
class Firefox
|
4
|
+
attr_reader :config, :capabilities
|
5
|
+
|
6
|
+
def initialize(config)
|
7
|
+
@config = config
|
8
|
+
init_browser
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def get_profile
|
14
|
+
if config.profile_path
|
15
|
+
Selenium::WebDriver::Firefox::Profile.new config.profile_path
|
16
|
+
elsif config.profile_name
|
17
|
+
Selenium::WebDriver::Firefox::Profile.from_name config.profile_name
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def init_browser
|
22
|
+
profile = get_profile
|
23
|
+
profile.assume_untrusted_certificate_issuer = false unless profile.nil?
|
24
|
+
@capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile)
|
25
|
+
end
|
26
|
+
|
27
|
+
end #Firefox
|
28
|
+
end #Runner
|
29
|
+
end #SeleniumConnect
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module SeleniumConnect
|
2
|
+
class Runner
|
3
|
+
class InternetExplorer
|
4
|
+
attr_reader :config, :capabilities
|
5
|
+
|
6
|
+
def initialize(config)
|
7
|
+
@config = config
|
8
|
+
init_browser
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def init_browser
|
14
|
+
@capabilities = config.browser.to_sym
|
15
|
+
end
|
16
|
+
|
17
|
+
end #InternetExplorer
|
18
|
+
end #Runner
|
19
|
+
end #SeleniumConnect
|
data/selenium-connect.gemspec
CHANGED
data/spec/acceptance_spec.rb
CHANGED
@@ -35,10 +35,10 @@ describe "Acceptance Tests" do
|
|
35
35
|
quit
|
36
36
|
end
|
37
37
|
|
38
|
-
it "profile name"
|
38
|
+
it "profile name" do
|
39
39
|
pending "requires machine setup to run, and need a public example"
|
40
40
|
SeleniumConnect.configure do |c|
|
41
|
-
c.profile_name = "
|
41
|
+
c.profile_name = "YourProfileNameGoesHere"
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -74,6 +74,8 @@ files:
|
|
74
74
|
- lib/selenium-connect/configuration.rb
|
75
75
|
- lib/selenium-connect/rake.task
|
76
76
|
- lib/selenium-connect/runner.rb
|
77
|
+
- lib/selenium-connect/runner/firefox.rb
|
78
|
+
- lib/selenium-connect/runner/ie.rb
|
77
79
|
- lib/selenium-connect/server.rb
|
78
80
|
- selenium-connect.gemspec
|
79
81
|
- spec/acceptance_spec.rb
|