views:

2893

answers:

8

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.

A: 

Hi there,

I, too, am experiencing this very problem on a Windows 7 64bit box, trying to run Selenium on it to test and ASP .Net MVC application, written in C#.

I am still trying to work out the answer for myself, but I thought I'd post here to tell you of a little progress I have made in getting something to work, albeit in Firefox instead of IE.

Here's the line I changed:

selenium = new DefaultSelenium("localhost", 4444, "*chrome C:/Program Files (x86)/Mozilla Firefox/firefox.exe", "http://www.bbc.co.uk/");

I would ideally like for this to work in Internet Explorer 8, but if for the moment, I can begin getting tests working and later change over to use IE again, then great.

Hope this helps for your problem with it all.

Brett Rigby
Hmm I have no problem running selenium in firefox or any other of the supported browser(opera,safari,chrome). It is just IE 8 that won't run.
chobo2
One suggestion I found that I have not been able to try yet. Is to run the server in admin mode. Try that out that might work
chobo2
+3  A: 

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

SchwartzE
Running the Selenium RC as an administrator solved the problem for me too.
alexander.egger
A: 

I have had the same problem and have found another solution which works for me. Just use the iexploreproxy setting in the browserString. I used: selenium = new DefaultSelenium("localhost", 4444, "iexploreproxy C:/Program Files/Internet Explorer/iexplorer.exe", "http://www.bbc.co.uk/"); I hope that works for others too :)

Dennis D
+1  A: 

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"
    ...

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

Jonas Söderström
A: 

I had the same problem on Windows 7 64bit IE8. The first step was to disable the IE popup blocker. Then, I got a message in the status bar saying that "Pop-ups were blocked on this page. Press the 'Ctrl' key to allow the pop-ups".

It turns out that the Google Toolbar was providing this feature. Disabling it solved the problem. View > Toolbars > Google to toggle.

John.

John
A: 

If you happen to be doing this from JavaScriptMVC, there is a reference you need to change in \jmvc\plugins\test\drivers\selenium.js:

1) Change iexplore to iexploreproxy and you should get better results:

    msie : (/iexploreproxy/i).test(browserStartCommand),

2) At this point, you'll find that you still get the popup error, but a separate instance of IE has started. Leave that IE window open and restart the tests, but not Selenium.

3) Next, the windows should show up in the right place, but IE gives the annoying block active content warning. Allow the content to run and restart the tests, but not Selenium itself.

This is super clunky, but it at least gets you past that part. If I find more methodical ways to do these things I'll update as needed.

Chris
A: 

You can start the test when you disable the Security mode of Internet. Don´t know the correct name for it, but in dutch it is beveiligde modus. I tried modifiing the security settings to dublicate this security mode, but couldn´t find the correct setting for it. It must therefor block more then you can set manually.

Koder
A: 

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.