History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-394
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: dina
Votes: 3
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Internet Explorer launch hangs after upgrading to 0.9.2

Created: 06/Dec/07 03:13 PM   Updated: 12/Aug/08 05:35 PM
Component/s: Launcher - Internet Explorer
Affects Version/s: 0.9.2
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Windows 2003 Server


 Description  « Hide
After upgrading to 0.9.2, our windows test environment could not launch InternetExplorer, and would just hang with no messages. I think this is being caused because our test environment has a perl script that does a Win32::Job spawn call (so we can kill the whole thing if need be) to launch a java session that in turn calls the InternetExplorerCustomProxyLauncher which then issues a killableprocess call and fails to return from that. It would be nice if killableprocess was an option or only used for Vista OS, since that is why it got added. Windows 2003 Server shouldn't need the killableprocess wrapper.

 All   Comments   Work Log   Change History      Sort Order:
Timothy Jones - 16/Jan/08 01:08 PM
I had this problem with Windows 2000/IE6 in a VM, and I was able to proceed once I patched my copy like this:

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

lost_traveller - 30/Jan/08 07:05 AM
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.

lost_traveller - 29/Feb/08 07:28 AM
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);
      }
   }