This repository has been archived by the owner on Jun 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/*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(); | ||
}); |