Skip to content

Commit 9f88503

Browse files
committed
refactoring of grid command line parameters / configuration classes. This is not fully backwards compatible with 2.X selenium, changes will be needed for anyone running selenium grid directly from Java.
Fixes #1773
1 parent d1f1992 commit 9f88503

File tree

111 files changed

+1409
-3179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1409
-3179
lines changed

Rakefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ task :support => [
155155
desc 'Build the standalone server'
156156
task 'selenium-server-standalone' => '//java/server/src/org/openqa/grid/selenium:selenium:uber'
157157

158-
task 'selenium-server-standalone-v3' => '//java/server/src/org/openqa/grid/selenium:selenium-v3:uber'
158+
task 'selenium-server-standalone-v3' => '//java/server/src/org/openqa/grid/selenium:selenium:uber'
159159

160160
task :ide => [ "//ide:selenium-ide-multi" ]
161161
task :ide_proxy_setup => [ "//javascript/selenium-atoms", "se_ide:setup_proxy" ]
@@ -545,16 +545,16 @@ task "release-v3" => [
545545
:clean,
546546
:build,
547547
'//java/server/src/org/openqa/selenium/remote/server:server:zip',
548-
'//java/server/src/org/openqa/grid/selenium:selenium-v3:zip',
548+
'//java/server/src/org/openqa/grid/selenium:selenium:zip',
549549
'//java/client/src/org/openqa/selenium:client-combined-v3:zip',
550550
] do |t|
551551
# Unzip each of the deps and rename the pieces that need renaming
552552
renames = {
553553
"client-combined-v3-nodeps-srcs.jar" => "selenium-java-v3-#{version}-srcs.jar",
554554
"client-combined-v3-nodeps.jar" => "selenium-java-v3-#{version}.jar",
555-
"selenium-v3-nodeps-srcs.jar" => "selenium-server-v3-#{version}-srcs.jar",
556-
"selenium-v3-nodeps.jar" => "selenium-server-v3-#{version}.jar",
557-
"selenium-v3-standalone.jar" => "selenium-server-v3-standalone-#{version}.jar",
555+
"selenium-nodeps-srcs.jar" => "selenium-server-v3-#{version}-srcs.jar",
556+
"selenium-nodeps.jar" => "selenium-server-v3-#{version}.jar",
557+
"selenium-standalone.jar" => "selenium-server-v3-standalone-#{version}.jar",
558558
}
559559

560560
t.prerequisites.each do |pre|
@@ -585,8 +585,8 @@ task "release-v3" => [
585585
end
586586

587587
mkdir_p "build/dist"
588-
cp "build/java/server/src/org/openqa/grid/selenium/selenium-v3-standalone.jar", "build/dist/selenium-server-v3-standalone-#{version}.jar"
589-
cp "build/java/server/src/org/openqa/grid/selenium/selenium-v3.zip", "build/dist/selenium-server-v3-#{version}.zip"
588+
cp "build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar", "build/dist/selenium-server-v3-standalone-#{version}.jar"
589+
cp "build/java/server/src/org/openqa/grid/selenium/selenium.zip", "build/dist/selenium-server-v3-#{version}.zip"
590590
cp "build/java/client/src/org/openqa/selenium/client-combined-v3.zip", "build/dist/selenium-java-v3-#{version}.zip"
591591
end
592592

java/client/src/org/openqa/selenium/remote/CapabilityType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public interface CapabilityType {
3535
String PROXY = "proxy";
3636
String SUPPORTS_WEB_STORAGE = "webStorageEnabled";
3737
String ROTATABLE = "rotatable";
38+
String APPLICATION_NAME = "applicationName";
3839
// Enable this capability to accept all SSL certs by defaults.
3940
String ACCEPT_SSL_CERTS = "acceptSslCerts";
4041
String HAS_NATIVE_EVENTS = "nativeEvents";

java/client/test/org/openqa/selenium/BUCK

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ java_library(name = 'helpers',
3838
deps = [
3939
'//java/client/src/org/openqa/selenium:webdriver-api',
4040
'//java/client/src/org/openqa/selenium/support/ui:wait',
41+
'//java/client/src/org/openqa/selenium/browserlaunchers/locators:locators',
4142
'//java/client/test/org/openqa/selenium/environment:environment',
4243
'//java/client/test/org/openqa/selenium/testing:helpers',
44+
'//java/client/src/org/openqa/selenium/support/ui:ui',
4345
'//third_party/java/guava:guava',
4446
'//third_party/java/junit:junit',
4547
],

java/client/test/org/openqa/selenium/build.desc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ java_library(name = "base",
3434
"//java/client/test/org/openqa/selenium/environment",
3535
"//java/client/test/org/openqa/selenium/testing",
3636
"//java/client/test/org/openqa/selenium/testing:annotations",
37+
"//java/client/src/org/openqa/selenium/support/ui:ui",
3738
"//third_party/java/junit",
3839
"//third_party/java/hamcrest",
3940
])
@@ -63,6 +64,7 @@ java_library(name = "tests",
6364
"//java/client/src/org/openqa/selenium/net",
6465
"//java/client/src/org/openqa/selenium/remote:common",
6566
"//java/client/src/org/openqa/selenium/support/ui:wait",
67+
"//java/client/src/org/openqa/selenium/browserlaunchers/locators:locators",
6668
"//java/client/test/com/thoughtworks/selenium/webdriven:small_tests",
6769
"//java/client/test/org/openqa/selenium/environment",
6870
"//java/client/test/org/openqa/selenium/testing:junit_4",

java/client/test/org/openqa/selenium/remote/build.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ java_test(name = "client-tests",
3232
deps = [
3333
"//java/client/src/org/openqa/selenium/logging",
3434
"//java/client/src/org/openqa/selenium/logging:api",
35-
"//java/client/src/org/openqa/selenium/remote",
35+
"//java/client/src/org/openqa/selenium/remote:augmenter",
3636
"//java/client/test/org/openqa/selenium:tests",
3737
"//third_party/java/junit",
3838
"//third_party/java/mockito",

java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public WebDriver get() {
6060
}
6161

6262
if (DesiredCapabilities.firefox().getBrowserName().equals(desiredCapsToUse.getBrowserName())) {
63-
boolean isMarionette = Boolean.getBoolean("webdriver.firefox.marionette");
63+
boolean isMarionette = Boolean.getBoolean(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE);
6464
if (!isMarionette) {
6565
if (isInDevMode()) {
6666
copyFirefoxDriverDefaultsToOutputDir();

java/client/test/org/openqa/selenium/testing/drivers/build.desc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ java_library(name = "drivers",
3232
"//javascript/firefox-driver:webdriver",
3333
"//third_party/java/guava",
3434
"//third_party/java/junit",
35+
"//third_party/java/phantomjs-driver:phantomjs-driver"
3536
])
3637

3738
java_library(name = "test_selenium_server",

java/server/src/org/openqa/grid/BUCK

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
java_library(name = 'grid',
22
srcs = glob([
3+
'common/**/*.java',
34
'internal/**/*.java',
5+
'shared/**/*.java',
46
'web/**/*.java',
57
]),
68
resources = glob([
@@ -9,16 +11,15 @@ java_library(name = 'grid',
911
'images/*.ico',
1012
'images/*.js',
1113
'images/*.png',
14+
'common/defaults/*.json',
1215
]),
1316
deps = [
1417
'//java/client/src/org/openqa/selenium:platform',
1518
'//java/client/src/org/openqa/selenium/io:io',
1619
'//java/client/src/org/openqa/selenium/net:net',
1720
'//java/client/src/org/openqa/selenium/remote:remote',
18-
'//java/server/src/org/openqa/grid/common:common',
1921
'//java/server/src/org/openqa/selenium/remote/server:server',
2022
'//java/server/src/org/openqa/selenium/remote/server/log:log',
21-
"//java/server/src/org/openqa/grid/shared:interfaces",
2223
'//third_party/java/gson:gson',
2324
'//third_party/java/guava:guava',
2425
'//third_party/java/httpcomponents:httpclient',
@@ -27,6 +28,7 @@ java_library(name = 'grid',
2728
'//third_party/java/jetty:jetty-for-rc',
2829
'//third_party/java/servlet:servlet-api',
2930
'//third_party/java/yaml:snakeyaml',
31+
'//third_party/java/beust:jcommander',
3032
],
3133
visibility = [
3234
'//java/server/src/org/openqa/grid/selenium:classes',
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11

22
java_library(name = "grid",
33
srcs = [
4+
"common/**/*.java",
45
"internal/**/*.java",
6+
"shared/**/*.java",
57
"web/**/*.java",
68
"selenium/proxy/**/*.java",
79
],
810
embedded = [
911
"images/",
12+
"common/defaults/",
1013
],
1114
deps = [
1215
"//java/client/src/org/openqa/selenium:webdriver-api",
1316
"//java/client/src/org/openqa/selenium/chrome",
14-
"//java/server/src/org/openqa/grid/common",
15-
"//java/server/src/org/openqa/grid/shared:interfaces",
1617
"//java/server/src/org/openqa/selenium/remote/server",
1718
"//third_party/java/httpcomponents:httpclient",
1819
"//third_party/java/guava",
1920
"//third_party/java/jcip_annotations",
2021
"//third_party/java/yaml",
21-
"//third_party/java/jetty"
22+
"//third_party/java/jetty",
23+
"//third_party/java/beust:jcommander"
2224
])
2325

java/server/src/org/openqa/grid/common/BUCK

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)