selenium-connect 3.5.0 → 3.6.0
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/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/bin/{selenium-server-standalone-2.34.0.jar → selenium-server-standalone-2.35.0.jar} +0 -0
- data/lib/selenium_connect/configuration.rb +1 -1
- data/lib/selenium_connect/job.rb +1 -15
- data/lib/selenium_connect/server.rb +25 -31
- data/selenium-connect.gemspec +2 -2
- data/spec/integration/lib/selenium_connect/runners/chrome_spec.rb +1 -2
- data/spec/integration/lib/selenium_connect/runners/firefox_spec.rb +1 -1
- data/spec/integration/lib/selenium_connect/runners/headless_spec.rb +7 -7
- data/spec/integration/lib/selenium_connect/runners/sauce_spec.rb +2 -2
- metadata +5 -6
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
#3.6.0 (2013-08-18)
|
2
|
+
upgraded selenium version and improved chrome log storage
|
3
|
+
|
4
|
+
- Bumped version to 3.6.0 to prepare for release.
|
5
|
+
- more code quality fixes
|
6
|
+
- code quality fixes
|
7
|
+
- cleaned up the server class a little and added sensible chrome log file saving to the jar so we don\'t move files around
|
8
|
+
- upgraded to newer version of jar file
|
9
|
+
|
1
10
|
#3.5.0 (2013-08-12)
|
2
11
|
updated selenium server jar and sauce version default plus screenshots and dom html for everyone
|
3
12
|
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#selenium-connect 3.
|
1
|
+
#selenium-connect 3.6.0 (2013-08-18)
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/selenium-connect) [](https://travis-ci.org/arrgyle/selenium-connect) [](https://codeclimate.com/github/arrgyle/selenium-connect) [](https://coveralls.io/r/arrgyle/selenium-connect?branch=develop)
|
4
4
|
|
Binary file
|
data/lib/selenium_connect/job.rb
CHANGED
@@ -37,7 +37,6 @@ class SeleniumConnect
|
|
37
37
|
@driver.quit
|
38
38
|
@data = { assets: {} }
|
39
39
|
process_sauce_logs(opts) if @config.host == 'saucelabs'
|
40
|
-
process_chrome_logs(opts) if @config.browser == 'chrome'
|
41
40
|
# rubocop:disable HandleExceptions
|
42
41
|
rescue Selenium::WebDriver::Error::WebDriverError
|
43
42
|
# rubocop:enable HandleExceptions
|
@@ -56,19 +55,6 @@ class SeleniumConnect
|
|
56
55
|
save_asset('dom.html', @driver.page_source)
|
57
56
|
end
|
58
57
|
|
59
|
-
# if a log path is configured move the logs, otherwise delete them
|
60
|
-
def process_chrome_logs(opts = {})
|
61
|
-
['chromedriver.log', 'libpeerconnection.log'].each do |log_file|
|
62
|
-
path = File.join(Dir.getwd, log_file)
|
63
|
-
|
64
|
-
if @config.log
|
65
|
-
FileUtils.mv(path, File.join(Dir.getwd, @config.log)) if File.exist? path
|
66
|
-
else
|
67
|
-
FileUtils.rm path if File.exist? path
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
58
|
def process_sauce_logs(opts = {})
|
73
59
|
job_id = @driver.session_id
|
74
60
|
@sauce_facade.job_id = job_id
|
@@ -76,7 +62,7 @@ class SeleniumConnect
|
|
76
62
|
status = 'failed'
|
77
63
|
@sauce_facade.fail_job
|
78
64
|
if opts.has_key?(:failshot) && opts[:failshot]
|
79
|
-
|
65
|
+
screenshot = @sauce_facade.fetch_last_screenshot
|
80
66
|
@data[:assets][:failshot] = save_asset('failshot.png', screenshot) if screenshot
|
81
67
|
end
|
82
68
|
end
|
@@ -25,41 +25,35 @@ class SeleniumConnect
|
|
25
25
|
|
26
26
|
private
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
t.background
|
40
|
-
#{
|
28
|
+
def get_rake_file
|
29
|
+
rake_file_path = current_dir_path + '/rake.task'
|
30
|
+
File.open(rake_file_path, 'w') do |file|
|
31
|
+
file.puts "require 'selenium/rake/server_task'"
|
32
|
+
file.puts 'Selenium::Rake::ServerTask.new(:server) do |t|'
|
33
|
+
if configuration.jar
|
34
|
+
file.puts "t.jar = '#{configuration.jar}'"
|
35
|
+
else
|
36
|
+
file.puts "t.jar = '#{current_dir_path + '/../../bin/selenium-server-standalone-2.35.0.jar'}'"
|
37
|
+
end
|
38
|
+
file.puts 't.background'
|
41
39
|
if configuration.log
|
42
|
-
"t.log = '#{File.join(Dir.getwd, configuration.log, 'server.log')}'"
|
40
|
+
file.puts "t.log = '#{File.join(Dir.getwd, configuration.log, 'server.log')}'"
|
43
41
|
else
|
44
|
-
|
42
|
+
file.puts 't.log = false'
|
45
43
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
file.puts "t.port = #{configuration.port}"
|
45
|
+
opts = ''
|
46
|
+
if configuration.browser == 'chrome'
|
47
|
+
opts += '-Dwebdriver.chrome.driver=' + current_dir_path + '/../../bin/chromedriver'
|
48
|
+
if configuration.log
|
49
|
+
opts += ' -Dwebdriver.chrome.logfile=' + File.join(Dir.getwd, configuration.log, 'chrome.log')
|
51
50
|
end
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
rake_file = File.open(rake_file_path, 'w')
|
59
|
-
rake_file << generate_rake_task
|
60
|
-
rake_file.close
|
61
|
-
rake_file_path
|
62
|
-
end
|
51
|
+
file.puts "t.opts = %w[#{opts}]"
|
52
|
+
end
|
53
|
+
file.puts 'end'
|
54
|
+
end
|
55
|
+
rake_file_path
|
56
|
+
end
|
63
57
|
|
64
58
|
def rake(task)
|
65
59
|
system "rake -f #{get_rake_file} server:#{task}"
|
data/selenium-connect.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'selenium-connect'
|
3
|
-
s.version = '3.
|
3
|
+
s.version = '3.6.0'
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.authors = ['Dave Haeffner', 'Jason Fox']
|
6
6
|
s.email = ['dave@arrgyle.com', 'jason@arrgyle.com']
|
7
7
|
s.homepage = 'https://github.com/arrgyle/selenium-connect'
|
8
8
|
s.summary = 'A stupid simple way to run your Selenium tests on localhost, against a Selenium Grid, or in the cloud (e.g. SauceLabs).'
|
9
|
-
s.description = '
|
9
|
+
s.description = 'upgraded selenium version and improved chrome log storage'
|
10
10
|
s.license = 'MIT'
|
11
11
|
|
12
12
|
s.files = `git ls-files`.split($/)
|
@@ -29,8 +29,7 @@ describe 'Chrome', selenium: true do
|
|
29
29
|
job.finish failshot: true
|
30
30
|
sc.finish
|
31
31
|
|
32
|
-
File.exist?(File.join(ENV['BUILD_PATH'], 'tmp', '
|
33
|
-
File.exist?(File.join(ENV['BUILD_PATH'], 'tmp', 'libpeerconnection.log')).should be_true
|
32
|
+
File.exist?(File.join(ENV['BUILD_PATH'], 'tmp', 'chrome.log')).should be_true
|
34
33
|
File.exist?(File.join(ENV['BUILD_PATH'], 'tmp', 'dom.html')).should be_true
|
35
34
|
File.exist?(File.join(ENV['BUILD_PATH'], 'tmp', 'failshot.png')).should be_true
|
36
35
|
end
|
@@ -33,7 +33,7 @@ describe 'Firefox', selenium: true do
|
|
33
33
|
it 'local jar file specified' do
|
34
34
|
opts = {
|
35
35
|
host: 'localhost',
|
36
|
-
jar: "#{Dir.pwd}/bin/selenium-server-standalone-2.
|
36
|
+
jar: "#{Dir.pwd}/bin/selenium-server-standalone-2.35.0.jar"
|
37
37
|
}
|
38
38
|
@config = SeleniumConnect::Configuration.new opts
|
39
39
|
sc = SeleniumConnect.start @config
|
@@ -9,14 +9,14 @@ describe 'Headless', selenium: true do
|
|
9
9
|
let(:quit) { SeleniumConnect.finish }
|
10
10
|
|
11
11
|
before(:each) do
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
config = SeleniumConnect::Configuration.new browser: 'phantomjs'
|
13
|
+
@sc = SeleniumConnect.start config
|
14
|
+
@job = @sc.create_job
|
15
|
+
@driver = @job.start
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'should run a basic test with phantom js' do
|
19
|
-
|
19
|
+
execute_simple_test @driver
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'should not find something on a page' do
|
@@ -26,8 +26,8 @@ describe 'Headless', selenium: true do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
after(:each) do
|
29
|
-
|
30
|
-
|
29
|
+
@job.finish
|
30
|
+
@sc.finish
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
@@ -14,8 +14,8 @@ describe 'Sauce Labs', selenium: true do
|
|
14
14
|
os: 'windows',
|
15
15
|
browser: 'iexplore',
|
16
16
|
browser_version: '7',
|
17
|
-
|
18
|
-
|
17
|
+
sauce_opts: { selenium_version: '2.32.0' },
|
18
|
+
description: 'test description'
|
19
19
|
}
|
20
20
|
config = SeleniumConnect::Configuration.new opts
|
21
21
|
@sc = SeleniumConnect.start config
|
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: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-08-
|
13
|
+
date: 2013-08-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: selenium-webdriver
|
@@ -76,8 +76,7 @@ dependencies:
|
|
76
76
|
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 0.0.8
|
79
|
-
description:
|
80
|
-
and dom html for everyone
|
79
|
+
description: upgraded selenium version and improved chrome log storage
|
81
80
|
email:
|
82
81
|
- dave@arrgyle.com
|
83
82
|
- jason@arrgyle.com
|
@@ -99,7 +98,7 @@ files:
|
|
99
98
|
- Rakefile
|
100
99
|
- bin/chromedriver
|
101
100
|
- bin/phantomjs
|
102
|
-
- bin/selenium-server-standalone-2.
|
101
|
+
- bin/selenium-server-standalone-2.35.0.jar
|
103
102
|
- lib/sauce/sauce_facade.rb
|
104
103
|
- lib/selenium-connect.rb
|
105
104
|
- lib/selenium_connect.rb
|
@@ -159,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
158
|
version: '0'
|
160
159
|
segments:
|
161
160
|
- 0
|
162
|
-
hash: -
|
161
|
+
hash: -2907860851704269908
|
163
162
|
requirements: []
|
164
163
|
rubyforge_project:
|
165
164
|
rubygems_version: 1.8.25
|