Created
March 16, 2013 13:09
-
-
Save n1k0/5176302 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<b>iframe</b> |
This file contains hidden or 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
<title>My page</title> | |
<iframe src="frame.html"></iframe> | |
<script> | |
setTimeout(function() { | |
document.getElementsByTagName('iframe')[0] | |
.setAttribute('name', 'myFrame'); | |
console.log('set'); | |
}, 1000); | |
</script> |
This file contains hidden or 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
;(function() { | |
'use strict'; | |
casper.start('page.html', function() { | |
this.test.assertTitle('My page'); | |
this.wait(3000); | |
}); | |
casper.then(function() { | |
// this will fail when 'name' attribute is added using js | |
casper.withFrame('myFrame', function() { | |
this.debugPage(); | |
}); | |
}); | |
casper.run(function() { | |
this.test.done(); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment