Commit 2c0090b3 2c0090b3f586daddfaf9bad44d12d026b7650d32 by Nicolas Perriault

added some tests for frames support

1 parent dce0aa77
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CasperJS frame 1</title>
</head>
<body id="f1">This is frame 1.</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CasperJS frame 2</title>
</head>
<body id="f2">This is frame 2.</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CasperJS test frames</title>
</head>
<frameset cols="50%,50%%">
<frame src="frame1.html" name="frame1">
<frame src="frame2.html" name="frame2">
</frameset>
</html>
/*global casper*/
/*jshint strict:false*/
casper.start('tests/site/frames.html', function() {
this.test.assertTitle('CasperJS test frames');
this.page.switchToChildFrame("frame1");
this.test.assertTitle('CasperJS frame 1');
this.test.assertExists("#f1");
this.test.assertDoesntExist("#f2");
this.page.switchToParentFrame();
this.page.switchToChildFrame("frame2");
this.test.assertTitle('CasperJS frame 2');
this.test.assertExists("#f2");
this.test.assertDoesntExist("#f1");
});
casper.run(function() {
this.test.done();
});