我有以下代码登录iTunesConnect进行应用程序开发:
log.info('login')
account = account || getAccountInfo()
casper
.open('https://itunesconnect.apple.com/')
.then(function () {
log.info('hello itc')
var _casper = this
_casper.wait(5000, function () {
var page = _casper.page,
i
for (i = 0; i < account.username.length; i += 1) {
page.sendEvent('keypress', account.username[i])
}
page.sendEvent('keypress', page.event.key.Tab)
for (i = 0; i < account.password.length; i += 1) {
page.sendEvent('keypress', account.password[i])
}
page.sendEvent('keypress', page.event.key.Enter)
_casper.wait(1000, function () {})
})
})
但是,出于某种原因,现在上面的功能没有加载iTunesConnect页面,因为看起来有重定向,我不知道如何传递它。如何更改上述代码以登录iTunesConnect?