I am assuming browser object is the instance of the Browser() class.
browser.windows.current = browser.windows[1]
This will make the browser object point to the first popup window. Now you can use the object the way you want it, just like you use it for the main window.
To make the object point back to the main window again use:
browser.windows.current = browser.windows[0]