Я пытаюсь сканировать страницу подключения Itunes.
Но не может получить доступ к iframe.
'document.querySelector ("html"). InnerHTML;'
В результате я думаю: он не обращается, потому что не находит элемент iframe.
Конечно, мое предположение может быть неверным.
Как мы можем решить эту проблему? помощь!
заранее спасибо
casper.thenOpen('https://itunesconnect.apple.com/login', function () {
this.waitForSelector('iframe', function () {
this.withFrame(0, function () {
this.waitFor(function check() {
return this.visible('#sign-in');
}, function then() {
this.sendKeys("#account_name_text_field", id);
this.wait(1000, function () {
this.click('#sign-in');
});
this.waitFor(function check() {
return this.visible('#password_text_field') && this.visible('#sign-in');
}, function then() {
this.sendKeys("#password_text_field", pw);
this.wait(1000, function () {
this.click('#sign-in');
});
});
});
});
});
});
'div id = "view-wrapper"'
Не похоже, что приближается снизу.
<body ng-class="wrapperClasses">
<div id="pageWrapper">
<div id="view-wrapper" class="flexcol" ui-view="">
<div ui-view>
<iframe src="https://idmsa.apple.com/appleauth/auth/signin?widgetKey=e0b80c3bf78523bfe80974d320935bfa30add02e1bff88ec2166c6bd5a706c42&font=sf" width="100%" height="100%" id="aid-auth-widget-iFrame" scrolling="no" frameborder="0"></iframe>
</div>