Issue Details (XML | Word | Printable)

Key: SIDE-228
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shinya Kasatani
Reporter: Shinya Kasatani
Votes: 4
Watchers: 6
Operations

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

waitForPopUp sometimes fails on Firefox 3

Created: 02/Jun/08 08:32 AM   Updated: 16/Sep/09 05:51 AM
Component/s: None
Affects Version/s: 1.0-beta
Fix Version/s: None

File Attachments: 1. Zip Archive 1.zip (10 kB) 20/Feb/09 01:42 AM - Andrey Polyanskiy

Image Attachments:

1. screenshot-1.jpg
(365 kB)


 Description  « Hide

In Firefox 3, waitForPopUp sometimes fails with the error message saying "[error] Window does not exist".
It is because waitForPopUp is executed before window.open function finishes.



Sort Order: Ascending order - Click to sort in descending order
Bernard added a comment - 03/Oct/08 04:23 AM

With Selenium IDE 1.0 Beta 2, this was encountered using the waitForPopUp command.

  • [info] Executing: |click | link=RSS 2.0 | |
  • [info] Executing: |waitForPopUp | calc | 30000 |
  • [error] Permission denied to get property Window.document
  • [info] Executing: |selectWindow | name=calc | |
  • [error] Unexpected Exception: message -> Permission denied to get property Window.seleniumMarker1223024508472, fileName -> XPCSafeJSObjectWrapper.cpp, lineNumber -> 445, stack -> , name -> Error

Basically, waitForPopup and selectWindow commands failed.

The same is true with remote control.

We are currently using selenium grid (ruby client driver) to test our application. And because of this issue, we are still using Firefox 2.

Hopefully, there will be a fix for this included on the next RC release.


Jerry Qian added a comment - 15/Dec/08 04:22 AM

Any updates?
I encounter similar issue: 'Permission denied to get property Window.seleniumMarker1229335916197'
Reproduce env. and steps:

  • Selenium-IDE1.0b2, FF3.0.4, WinXP
  • Prepare my suite/case html on c:/testlib/mytestsuite.html
  • Type chrome URL in FF3 address bar: chrome://selenium-ide-testrunner/content/selenium/TestRunner.html?auto=true&multiWindow=true&userExtensionsURL=&close=false&test=file:///c:/testlib/mytestsuite_suite.html
  • FF3 Chrome runner stuck with error message on 1st step: 'Permission denied to get property Window.seleniumMarker1229335916197'

I have debugged into Selenium code, it seems Selenium-browserbot.js near line 640:
BrowserBot.prototype.modifySeparateTestWindowToDetectPageLoads = function(windowObject) {
...
else { windowObject.location[marker] = true; windowObject[this.uniqueId] = marker; this.pollForLoad(this.recordPageLoad, windowObject, windowObject.document, windowObject.location, windowObject.location.href, marker); // this block threw above permission denied exception on FF3 }
};

Shinya. Can you please take a look?

Thanks.


Jerry Qian added a comment - 15/Dec/08 10:52 PM

My above issue only happened when i set &multiWindow=true.
If I use single window mode, everything is well on FF3.


Ryan Ausanka-Crues added a comment - 16/Feb/09 11:08 PM

I'm running into this issue too, any updates?


Shinya Kasatani added a comment - 18/Feb/09 01:12 AM

If you have a test case that always (or very often) reproduces this problem, can you attach it?


Andrey Polyanskiy added a comment - 20/Feb/09 01:42 AM

A page with javascript link. it opens new window and loads a page into it.
link works when page was opened manually in FF3.
But when a page was opened in FF3 which was opened by Selenium - link does not work properly.
If i click on this link, I see new window opened with empty url and empty content.


Andrey Polyanskiy added a comment - 20/Feb/09 01:45 AM

PHP script which fails on waitForPopUp
$se->click("db_manager_for_mysql_link");
$se->waitForPopUp("db_manager_for_mysql_link",30000);

Error is:
The Response of the Selenium RC is invalid: ERROR Server Exception: unexpected command json={command:"waitForPopUp",target:"db_manager_for_mysql_link",value:"300000"} in place before new command waitForPopUp could be added


Andrey Polyanskiy added a comment - 20/Feb/09 02:00 AM

Firefox 3.0.6
OS: Windows 2003 5.2 x86
Selenium server v1.0-beta-2 [2571], with Core v1.0-beta-2 [2330]

Note, that this link can be opened successfully when I use "*iehta"


Andrey Polyanskiy added a comment - 20/Feb/09 02:11 AM

I have attached the page in 1.zip file


Jerry Qian added a comment - 20/Feb/09 02:37 AM

See clue: http://jira.openqa.org/browse/SEL-339
Please add openWindow to fix this issue.

<tr>
<td>open</td>
<td>/1/index.html</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>db_manager_for_mysql_link</td>
<td></td>
</tr>
<tr>
<td>openWindow</td>
<td></td>
<td>db_manager_for_mysql_link</td>
</tr>
<tr>
<td>waitForPopUp</td>
<td>db_manager_for_mysql_link</td>
<td>30000</td>
</tr>
<tr>
<td>selectWindow</td>
<td>name=db_manager_for_mysql_link</td>
<td></td>
</tr>

You can read openWindow and selectWindow help docs.
I figure the reason is FF3 window.open is async with Selenium. Then Selenium can't capture id to allWindows Array.


Andrey Polyanskiy added a comment - 20/Feb/09 07:21 AM

Thank you, Jerry, but this workaround did not help me...
Now I see 2 empty windows opened instead of one empty window...


Andrey Polyanskiy added a comment - 20/Feb/09 07:39 AM

As i understand, my problem is in too complex javascript - it opens window with generated on-the-fly contents.
I see no such problem when more simple javascript function used.
But this code worked successfully with Selenium + Firefox 2.0


Ryan Ausanka-Crues added a comment - 04/Aug/09 10:01 PM

Any updates?