Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer 8 64bit and Selenium Not working

I am trying to get selenium tests to run. Yet every time I try to run a tests that should run IE I get a error on line 863 of htmlutils.js It says that I should disable my popup blocker. The thing is I went to IE tools-> turn of popup block.

So it is disabled and I get this error.

Is there something else I need to disable. I actually don't even know what version of Internet explorer it is running since I am using Windows 7 Pro 64bit version. So when I do use IE I use 64bit version but I am under the understanding if the site or something like that does not support 64bit it goes to 32bit.

So not sure what I need to do it to make it work.

This is the lines where it does

function openSeparateApplicationWindow(url, suppressMozillaWarning) {
    // resize the Selenium window itself
    window.resizeTo(1200, 500);
    window.moveTo(window.screenX, 0);

    var appWindow = window.open(url + '?start=true', 'selenium_main_app_window');
    if (appWindow == null) {
        var errorMessage = "Couldn't open app window; is the pop-up blocker enabled?"
        LOG.error(errorMessage);
        throw new Error("Couldn't open app window; is the pop-up blocker enabled?");
    }

Where is this log.error message stored? Maybe I can post that too.

like image 937
chobo2 Avatar asked Oct 04 '09 22:10

chobo2


3 Answers

I had a similar problem on Vista and IE8 I would get the same error message

Couldn't open app window; is the pop-up blocker enabled?"

Running my remote control as Admin wasn't an option for me, and also a poor idea from a security perspective. So in the end I manage to solved this by changeing browser from "*ietha" to "*iexploreproxy" grid_configuration.yml

hub:
  port: 4444
    ...
    - name: "Internet Explorer 8 on Vista"
      browser: "*iexploreproxy"
    ...

Alternatively, you can change browser string from the code:

ISelenium selenium = new DefaultSelenium("localhost", 4444, "*iexploreproxy", "http://www.google.com/");

Works like a charm. The only question remaing is if this somehow affects the outcome of the test cases. So far no, but I'll update this answer in case that would happen.

like image 129
Jonas Söderström Avatar answered Oct 22 '22 00:10

Jonas Söderström


I ran into this on Windows 7 64bit.

My solution was:

  1. Disable popup block. - Select "Tools/Popup Blocker/Turn off pop-up blocker"

  2. Disable IE protected mode. - Untick "Tools/Internet Options/Security/Enable protected mode"

It'd be better just to disable protected modes for known trusted hosts/addresses. I'll leave that as an exercise for the reader.

like image 39
user361500 Avatar answered Oct 22 '22 01:10

user361500


I was experiencing the same problem. I ran the Selenium RC server as an administrator and everything worked fine.

like image 8
SchwartzE Avatar answered Oct 22 '22 00:10

SchwartzE