Lines 64-69
Link Here
|
64 |
public static int seleniumDefaultPort = -1; |
64 |
public static int seleniumDefaultPort = -1; |
65 |
public static final String PORT = "Port"; |
65 |
public static final String PORT = "Port"; |
66 |
public static final String START_ON_STARTUP = "Startup"; |
66 |
public static final String START_ON_STARTUP = "Startup"; |
|
|
67 |
public static final String FIREFOX_PROFILE = "FirefoxProfile"; |
68 |
public static final String SINGLE_WINDOW = "SingleWindow"; |
67 |
private static InstanceProperties instanceProps; |
69 |
private static InstanceProperties instanceProps; |
68 |
private static final String NAMESPACE = "Selenium server properties namespace"; //NOI18N |
70 |
private static final String NAMESPACE = "Selenium server properties namespace"; //NOI18N |
69 |
|
71 |
|
Lines 73-78
Link Here
|
73 |
Set set = sheet.get(Sheet.PROPERTIES); |
75 |
Set set = sheet.get(Sheet.PROPERTIES); |
74 |
set.put(new ServerIntProperty(PORT, props)); |
76 |
set.put(new ServerIntProperty(PORT, props)); |
75 |
set.put(new ServerBoolProperty(START_ON_STARTUP, props)); |
77 |
set.put(new ServerBoolProperty(START_ON_STARTUP, props)); |
|
|
78 |
set.put(new ServerStringProperty(FIREFOX_PROFILE, props)); |
79 |
set.put(new ServerBoolProperty(SINGLE_WINDOW, props)); |
76 |
return sheet; |
80 |
return sheet; |
77 |
} |
81 |
} |
78 |
|
82 |
|
Lines 114-119
Link Here
|
114 |
instanceProps = manager.createProperties(NAMESPACE); |
118 |
instanceProps = manager.createProperties(NAMESPACE); |
115 |
instanceProps.putInt(PORT, getSeleniumDefaultPort()); |
119 |
instanceProps.putInt(PORT, getSeleniumDefaultPort()); |
116 |
instanceProps.putBoolean(START_ON_STARTUP, true); |
120 |
instanceProps.putBoolean(START_ON_STARTUP, true); |
|
|
121 |
instanceProps.putString(FIREFOX_PROFILE , ""); |
122 |
instanceProps.putBoolean(SINGLE_WINDOW , false); |
117 |
allProps.add(instanceProps); |
123 |
allProps.add(instanceProps); |
118 |
} |
124 |
} |
119 |
} |
125 |
} |
Lines 161-168
Link Here
|
161 |
|
167 |
|
162 |
} |
168 |
} |
163 |
|
169 |
|
|
|
170 |
private static final class ServerStringProperty extends ServerProperty<String> { |
164 |
|
171 |
|
|
|
172 |
public ServerStringProperty(String propertyName, InstanceProperties props) { |
173 |
super(String.class, propertyName, props); |
174 |
} |
165 |
|
175 |
|
|
|
176 |
@Override |
177 |
public String getValue() throws IllegalAccessException, InvocationTargetException { |
178 |
return props.getString(getName(), ""); |
179 |
} |
180 |
|
181 |
@Override |
182 |
protected void writeNewValue(String val) { |
183 |
props.putString(getName(), val); |
184 |
} |
185 |
|
186 |
} |
187 |
|
188 |
|
189 |
|
166 |
private static abstract class ServerProperty<T> extends Node.Property<T>{ |
190 |
private static abstract class ServerProperty<T> extends Node.Property<T>{ |
167 |
|
191 |
|
168 |
protected InstanceProperties props; |
192 |
protected InstanceProperties props; |