|
|
|
[
Permlink
| « Hide
]
Jeantine Mankelow - 24/Sep/06 09:22 PM
oops I mean to say "Unfortunately there doesn't seeem to be anyway to distinguish between undefined and unassigned variables."
I see this issue is still unassigned. I have the same problem with waitForPopup when testing the core functionality in our webapp. The popup 'detailSatellite' is opened inside a nested frame. To reproduce, please execute the following TestSearchAndBook.html with SIDE and BaseURL http://www4.hrs.de
-------8<------------------------------------------ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>TestSearchAndBook</title> </head> <body> <table cellpadding="1" cellspacing="1" border="1"> <thead> <tr><td rowspan="1" colspan="3">TestSearchAndBook</td></tr> </thead><tbody> <tr> <td>open</td> <td>/</td> <td></td> </tr> <tr> <td>type</td> <td>document.searchForm.location</td> <td>berlin</td> </tr> <tr> <td>clickAndWait</td> <td>//div[5]/input</td> <td></td> </tr> <tr> <td>clickAndWait</td> <td>link=Berlin - Deutschland</td> <td></td> </tr> <tr> <td>pause</td> <td>10000</td> <td></td> </tr> <tr> <td>click</td> <td>link=Berolina Airport</td> <td></td> </tr> <tr> <td>pause</td> <td>10000</td> <td></td> </tr> <tr> <td>waitForPopUpAndWait</td> <td>detailSatellite</td> <td>30000</td> </tr> <tr> <td>selectWindow</td> <td>detailSatellite</td> <td></td> </tr> <tr> <td>clickAndWait</td> <td>initBooking</td> <td></td> </tr> </tbody></table> </body> </html> ------->8----------------------------- Ok, my comment was OT, sorry. My problem is related to the overwriting of window.open in selenium-browserbot.js:
The reason for the failing of waitForPopup is: The window-object of the window.open-call from a frameset's frame is NOT the window-object selenium is listening to. The new popup window cannot be found because it's originating window has never been 'modified' by selenium, therefore selenium is not reacting on opening window-objects introduced by i.e. framesets. BrowserBot just overwrites the open-method of the top window, which is IMHO not enough; but I must admit I am not deep enough into seleniums inner works to provide a patch. So, here's the approach from the other end of the AUT: Instead of using window.open I am using top.open and waitForPopup is working now. BUT, this is not the way our app is specified. It is integrated into many sites into its own iframe and we have to avoid to rely on anything outside our scope. One possible solution is to modify the behaviour if we are running under selenium for now... I see this problem too. However:
It happens on both Selenium 0.7 and 0.8 with both FF 1.5.0.7 and 2.2rc. But, the readyState flag does not evaluate to true. Removing the whole section (as indicated by the original poster) does not help either. I wonder if using proxy injection mode would help in this case, since PI mode intercepts window.open in all windows and frames.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||