views:

25

answers:

0

Please find below the code used selenium.getEval("this.browserbot.getCurrentWindow().open('', 'Window')"); (opens a new window) selenium.click("A link"); (This is done in the Parent Window, and the Pop up opens in the window opened in the above statement) BaseClass.selenium.selectWindow("Window");(This does not report any error) System.out.println(BaseClass.selenium.getTitle()); (Reports error mentioned below) selenium.close(); selenium.selectWindow("null");

The error "com.thoughtworks.selenium.SeleniumException: ERROR: Current window or frame is closed!" is displayed. Selenium recognizes the new Window,(am able to select the window even) but i am not able to do anything with this window, like maximize, focus etc.

This window currently displays a PDF, is this any reason for the error.