#217956 - UI Element / User-extensions are not configurable via Selenium Server Configuartion
1.1 --- a/selenium.server/src/org/netbeans/modules/selenium/server/Bundle.properties Mon Oct 15 23:38:26 2012 +0200
1.2 +++ b/selenium.server/src/org/netbeans/modules/selenium/server/Bundle.properties Thu Nov 01 09:53:16 2012 +0100
1.3 @@ -24,4 +24,7 @@
1.4
1.5 displayName_SingleWindow=Single Window
1.6 desc_SingleWindow=Should the browser started by selenium server use <br/> \
1.7 -multiple frames in a single window or multiple windows.
1.8 \ No newline at end of file
1.9 +multiple frames in a single window or multiple windows.
1.10 +
1.11 +displayName_UserExtensions=Selenium User Extensions
1.12 +desc_UserExtensions=The User Extension file for Selenium Server
2.1 --- a/selenium.server/src/org/netbeans/modules/selenium/server/SeleniumProperties.java Mon Oct 15 23:38:26 2012 +0200
2.2 +++ b/selenium.server/src/org/netbeans/modules/selenium/server/SeleniumProperties.java Thu Nov 01 09:53:16 2012 +0100
2.3 @@ -66,6 +66,7 @@
2.4 public static final String START_ON_STARTUP = "Startup"; //NOI18N
2.5 public static final String FIREFOX_PROFILE = "FirefoxProfile"; //NOI18N
2.6 public static final String SINGLE_WINDOW = "SingleWindow"; //NOI18N
2.7 + public static final String USER_EXTENSIONS = "UserExtensions"; //NOI18N
2.8
2.9 private static InstanceProperties instanceProps;
2.10 private static final String NAMESPACE = "Selenium server properties namespace"; //NOI18N
2.11 @@ -78,6 +79,7 @@
2.12 set.put(new ServerBoolProperty(START_ON_STARTUP, props));
2.13 set.put(new ServerStringProperty(FIREFOX_PROFILE, props));
2.14 set.put(new ServerBoolProperty(SINGLE_WINDOW, props));
2.15 + set.put(new ServerStringProperty(USER_EXTENSIONS, props));
2.16 return sheet;
2.17 }
2.18
2.19 @@ -121,6 +123,7 @@
2.20 instanceProps.putBoolean(START_ON_STARTUP, true);
2.21 instanceProps.putString(FIREFOX_PROFILE, ""); //NOI18N
2.22 instanceProps.putBoolean(SINGLE_WINDOW, false);
2.23 + instanceProps.putString(USER_EXTENSIONS, ""); //NOI18N
2.24 allProps.add(instanceProps);
2.25 }
2.26 }
3.1 --- a/selenium.server/src/org/netbeans/modules/selenium/server/SeleniumServerRunner.java Mon Oct 15 23:38:26 2012 +0200
3.2 +++ b/selenium.server/src/org/netbeans/modules/selenium/server/SeleniumServerRunner.java Thu Nov 01 09:53:16 2012 +0100
3.3 @@ -116,6 +116,7 @@
3.4 }
3.5 switch (action) {
3.6 case START:
3.7 + callSeleniumServerMethod("boot");
3.8 callSeleniumServerMethod("start");
3.9 break;
3.10 case STOP:
3.11 @@ -123,12 +124,14 @@
3.12 break;
3.13 case RESTART:
3.14 callSeleniumServerMethod("stop");
3.15 + callSeleniumServerMethod("boot");
3.16 callSeleniumServerMethod("start");
3.17 break;
3.18 case RELOAD:
3.19 callSeleniumServerMethod("stop");
3.20 server = null;
3.21 initializeServer();
3.22 + callSeleniumServerMethod("boot");
3.23 callSeleniumServerMethod("start");
3.24 break;
3.25 default:
3.26 @@ -202,6 +205,15 @@
3.27 remoteControlConfigurationInstance, ffProfileDir);
3.28 }
3.29 }
3.30 + String userExtensionsString = ip.getString(SeleniumProperties.USER_EXTENSIONS, ""); //NOI18N
3.31 + if (!userExtensionsString.isEmpty()) {
3.32 + File userExtensionFile = new File(userExtensionsString);
3.33 + if (userExtensionFile.exists()) {
3.34 + remoteControlConfiguration.getMethod("setUserExtensions", File.class).invoke( //NOI18N
3.35 + remoteControlConfigurationInstance, userExtensionFile);
3.36 + }
3.37 + }
3.38 +
3.39 server = seleniumServer.getConstructor(remoteControlConfiguration).
3.40 newInstance(remoteControlConfigurationInstance);
3.41 }