File tree Expand file tree Collapse file tree 1 file changed +9
-20
lines changed
rb/spec/integration/selenium/webdriver/spec_support Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -102,28 +102,17 @@ def remote_server?
102
102
end
103
103
104
104
def remote_server_jar
105
- local_selenium_jar = 'selenium_server_deploy.jar'
106
- downloaded_selenium_jar = "selenium-server-standalone-#{ Selenium ::Server . latest } .jar"
107
-
108
- directory_names = [
109
- root ,
110
- root . join ( 'rb' ) ,
111
- root . join ( 'build' ) ,
112
- root . join ( 'build/rb' ) ,
113
- Pathname . new ( Dir . pwd ) . join ( 'rb' )
114
- ]
115
- file_names = [ local_selenium_jar , downloaded_selenium_jar ]
116
- file_names . delete ( local_selenium_jar ) if ENV [ 'DOWNLOAD_SERVER' ]
117
-
118
- files = file_names . each_with_object ( [ ] ) do |file , array |
119
- directory_names . each { |dir | array << "#{ dir } /#{ file } " }
120
- end
121
-
122
- jar = files . find { |file | File . exist? ( file ) } ||
123
- Selenium ::Server . download ( :latest ) && files . find { |file | File . exist? ( file ) }
105
+ test_jar = "#{ Pathname . new ( Dir . pwd ) . join ( 'rb' ) } /selenium_server_deploy.jar"
106
+ built_jar = root . join ( 'bazel-bin/java/server/src/org/openqa/selenium/grid/selenium_server_deploy.jar' )
107
+ jar = if File . exist? ( test_jar ) && ENV [ 'DOWNLOAD_SERVER' ] . nil?
108
+ test_jar
109
+ elsif File . exist? ( built_jar ) && ENV [ 'DOWNLOAD_SERVER' ] . nil?
110
+ built_jar
111
+ else
112
+ Selenium ::Server . download ( :latest )
113
+ end
124
114
125
115
WebDriver . logger . info "Server Location: #{ jar } "
126
- puts "Server Location: #{ jar } "
127
116
jar
128
117
end
129
118
You can’t perform that action at this time.
0 commit comments