Here a copy of a question I mailed to the creators of IeUnit. It is a very generic question, maybe someone somewhere out there in blogspace can help me out on this.
I try to achieve something that I don’t seem to get done…
In IeUnit a window is opened (through cscript) to access my web page using code like:
win = WScript.CreateObject("InternetExplorer.Application");
We then navigate to the page to test:
where accesstest.htm is a page containing the following html:
<title>My test title</title>
I can now display things like:
win.document.title à My test title
win.document.getThis à 10
How can I access the getThis variable in the page?
And why do I need this: I’m creating an IeUnit extension lib for testing SharePoint pages. I want to access the Web Part Page Services Component, defined in a variable WPSC. But I can’t access this variable from my test classes.