|
RE: Select and Close "PDF" Popup Window: msg#00063web.selenium.user
selectWindow needs to receive the window ID, not the window name. The window ID is the value returned by window.open() Example Javascript: function OpenPopup() { // Noticed I removed 'var' here, to make the 'MyWinID' variable global. MyWinID = window.open("/documentations/some.pdf", "SomeNameHere", "width=600, height=400, menubar=yes, status=yes, scrollbars=no, toolbar=yes, location=no, resizable=no"); } Selenium Test: | selectWindow | MyWinID | | | close | | | Hope this works for you as it did for me! :) - Guillaume Boudreau -----Original Message----- From: selenium-users-bounces-EcuzILgp2tAZVhN9JVcPDEqbzN8AcRLmILAQCsJbaHk@xxxxxxxxxxxxxxxx [mailto:selenium-users-bounces-EcuzILgp2tAZVhN9JVcPDEqbzN8AcRLmILAQCsJbaHk@xxxxxxxxxxxxxxxx] On Behalf Of Nikko Sent: Monday, October 17, 2005 11:21 AM To: selenium-users-EcuzILgp2tAZVhN9JVcPDEqbzN8AcRLmILAQCsJbaHk@xxxxxxxxxxxxxxxx Subject: [Selenium-users] Select and Close "PDF" Popup Window Hi All, At first I want to say that 'Selenium' is a grateful program for automatic testing. Thanks for developers. But I have one problem. There are many links in the testing site, which loads PDF document in new window(see script below). So in Selenium I use the following command: selectWindow(Name of Window) and close, but 'PDF' Popup Window doesn't select and close. I don't know if 'Close' Command works correctly, because I can not focus in window. I heard that when PDF document loaded in Popup Window, this window wasn't a HTML but Win32 window. And else, if popup window is appearing without any action(click on buttons or links) but with Javascript(onload example), then there is no possible to select focus on this popup. Could You help me? What should I do? <script language="javascript"> function OpenPopup() { var MyWin = window.open("C:/Test/00002170.pdf", "MyWinID", "width=600, height=400, menubar=yes, status=yes, scrollbars=no, toolbar=yes, location=no, resizable=no"); } </script> Best regards, Nikolay Predko, Quality Engineer, NIX Solutions Ltd MSN: Nikko-8WX+Xy0mVKnMohDmgNdYFA@xxxxxxxxxxxxxxxx ICQ: 174716602 _______________________________________________ Selenium-users mailing list Selenium-users-EcuzILgp2tAZVhN9JVcPDEqbzN8AcRLmILAQCsJbaHk@xxxxxxxxxxxxxxxx http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: links: 00063, Guillaume Boudreau |
|---|---|
| Next by Date: | Re: document object in user-extensions.js: 00063, vernon viles |
| Previous by Thread: | Select and Close "PDF" Popup Windowi: 00063, Nikko |
| Next by Thread: | Re: Select and Close "PDF" Popup Window: 00063, Jamie Orchard-Hays |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |