jat
unread,Jul 1, 2008, 4:55:55 AM7/1/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to crosscheck
I am now using crosscheck to run some javascript, and I hope I can get
the dom after the javascript is executed.
For example: the following is part of common-dom.jst.
crosscheck.addTest({
test_height_properties: function() {
var elem = document.createElement('div');
elem.style.height = '20px';
document.body.appendChild(elem)
},
})
I hope after "test_height_properties" is executed, I can get the dom
who has a child <div style="height:20px"/>. I wonder how can I make
that.
I write a java test to see whether I can get the right thing as
following:
public void test()
{
String fileName="test/net/thefrontside/crosscheck/hosts/
browser/common-dom.jst";
Crosscheck crosscheck = new Crosscheck();
crosscheck.addCrosscheckListener( new StatusListener());
File sourceFile = new File(fileName);
if (sourceFile.isFile())
crosscheck.addTestSource(sourceFile.getName(), new
FileReader(sourceFile));
crosscheck.runAll(env);
BrowserTestInterface browser= env.getBrowser();
BaseElement node=browser.getDocument().getDocumentElement();
System.out.println(node.get_innerHTML());
}
while the result is just "<head/><body/>".
can anyone help me?
thanks
jat.