Hi,Raj

Below is the function by which Selenium selects the popup:

BrowserBot.prototype.getTargetWindow = function(windowName) {
    LOG.debug("getTargetWindow(" + windowName + ")");
    // First look in the map of opened windows
    var targetWindow = this.openedWindows[windowName];
    if (!targetWindow) {
        var evalString = "this.getContentWindow().window." + windowName;
        targetWindow = eval(evalString);
    }
    if (!targetWindow) {
        throw new SeleniumError("Window does not exist");
    }
    return targetWindow;
};

Below is the snippet from selenium-browserbot.js see you can see window.open
was overrided to record popup in this.opendWindows[windowName].
    windowToModify.open = function(url, windowName, windowFeatures,
replaceFlag) {
        //debugger;
        var openedWindow = originalOpen(url, windowName, windowFeatures,
replaceFlag);
        selenium.browserbot.openedWindows[windowName] = openedWindow;
        return openedWindow;
    };

So I think you can hack Selenium to get what you want!
Good Luck!
James.


----- Original Message ----- 
From: "siva reddy" <[EMAIL PROTECTED]>
To: <selenium-users@lists.public.thoughtworks.org>
Sent: Monday, November 14, 2005 1$22 PM
Subject: [Selenium-users] Regarding child windows and dialogs


> Hi All,
> I have a small problem with selenium.Selenium
> recognizes the new(child) windows  opened during
> testing
> using id(or return value of the function) of new
> window.But I am workin on an application where windows
> don't have any ids.Is there any solution to this
> problem.Please respond.
>
> Thanks in Advance,
> Raj.
>
>
>
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs
> _______________________________________________
> Selenium-users mailing list
> Selenium-users@lists.public.thoughtworks.org
> http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to