|
|
|
I have also suffered from this problem, would appear that killableprocess.exe does not work with win2000
for details see: http://forums.openqa.org/message.jspa?messageID=31022#31022 I hope this patch makes it into the next release. Actually the code that worked for me was: because changeRegistrySettings() needs to be outside the useKillableProcess block
private static boolean useKillableProcess = WindowsUtils.thisIsWindows() && System.getProperty("os.name").equals("Windows 2000") == false && System.getProperty("noKillableProcess") == null; public void launch(String url) { try { if (WindowsUtils.thisIsWindows()) { backupRegistrySettings(); changeRegistrySettings(); if (useKillableProcess) { File killableProcessWrapper = new File(customProxyPACDir, "killableprocess.exe"); ResourceExtractor.extractResourcePath(InternetExplorerCustomProxyLauncher.class, "/killableprocess/killableprocess.exe", killableProcessWrapper); cmdarray = new String[] { killableProcessWrapper.getAbsolutePath(), commandPath, "-new", url}; } else { // DGF IEs4Linux, perhaps? It could happen! cmdarray = new String[] { commandPath, url}; } } else { // DGF IEs4Linux, perhaps? It could happen! cmdarray = new String[] { commandPath, url}; } log.info("Launching Internet Explorer..."); AsyncExecute exe = new AsyncExecute(); exe.setCommandline(cmdarray); process = exe.asyncSpawn(); } catch (IOException e) { throw new RuntimeException(e); } } |
|||||||||||||||||||||||||||||||||||||||||||||||||||
Index: server-coreless/src/main/java/org/openqa/selenium/server/browserlaunchers/InternetExplorerCustomProxyLauncher.java
===================================================================
--- server-coreless/src/main/java/org/openqa/selenium/server/browserlaunchers/InternetExplorerCustomProxyLauncher.java (revision 2116)
+++ server-coreless/src/main/java/org/openqa/selenium/server/browserlaunchers/InternetExplorerCustomProxyLauncher.java (working copy)
@@ -177,7 +177,17 @@
public void launch(String url) {
try {
- if (WindowsUtils.thisIsWindows()) {
+ log.info("launch(" + url + ")...");
+ log.info("WindowsUtils.thisIsWindows(): " + WindowsUtils.thisIsWindows() );
+ log.info("System.getProperty('os.name'): '" + System.getProperty("os.name") + "'" );
+ log.info("System.getProperty('os.name').equals('Windows 2000') == false: " + (System.getProperty("os.name").equals("Windows 2000") == false));
+ log.info("System.getProperty('noKillableProcess') == null: " + (System.getProperty("noKillableProcess") == null));
+ boolean useKillableProcess = WindowsUtils.thisIsWindows() &&
+ System.getProperty("os.name").equals("Windows 2000") == false &&
+ System.getProperty("noKillableProcess") == null;
+ log.info("useKillableProcess: "+ useKillableProcess );
+
+ if (useKillableProcess ) {
backupRegistrySettings();
changeRegistrySettings();
File killableProcessWrapper = new File(customProxyPACDir, "killableprocess.exe");
It checks for os.name == Windows 2000 (you can check for 2003 also) or the System property -DnoKillableProcess=anything. If either of these are true, then it does not call killableprocess.exe.
Feel free to include something like this in the next release.
tlj