切换到iframe并单击iframe内的链接,这是我尝试遵循以下代码的基本情况
casper.start('url', function() {
this.wait(10000);
this.switchToFrame('#detail-frame');
this.click('link');
this.echo("Done");
}); casper.run();
});
HTML code -
iframe allowfullscreen="allowfullscreen" id="detail-frame" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" iframe
它显示以下错误:
失败找不到名为“#detail-frame”的框架。 #类型:uncaughtError #文件:link_each.js:2310 #错误:找不到名为“#detail-frame”的框架。 #switchToChildFrame @ phantomjs://platform/casper.js:2310:78