I have TestGen4Web script for automating testing on a web-based user interface that has a popup window (hey i didn't write that ui..). In order to write a complete test script that branches the flow based on the some presence of some content in the popup window, I need to write a simple if condition that does something like if document.getElementById("xyz").value - that will run on the popup window and not the parent window.
Any ideas on how to accomplish this? currently, the condition fails because it runs on the parent window.
Also, how to extract some text from the dom and spit it out to a file at the end of the test?