[英]CasperJS has been redirected and then exited with status=fail (HTTP 302)
CasperJS version 1.1.4 at /opt/casperjs, using phantomjs version 2.1.1. 使用phantomjs版本2.1.1的/ opt / casperjs中的CasperJS版本1.1.4。 Running on centOS.
在centOS上运行。
Trying to get through authentication page which runs on ASP.net webforms, but after submit button click: 试图通过在ASP.net Webforms上运行的身份验证页面,但是在提交按钮之后单击:
casper.then(function(){
if (this.exists("#LoginTyreLink_LoginButton")) {
this.echo("Login button found");
this.click("#LoginTyreLink_LoginButton", function(){
saveShot("login_button_clicked");
});
}
});
I am getting the redirect cycle and timeout: 我收到重定向周期和超时:
[debug] [phantom] Mouse event 'mouseup' on selector: #Loginsite_LoginButton
[debug] [phantom] Mouse event 'click' on selector: #Loginsite_LoginButton
[info] [phantom] Step anonymous 14/17: done in 3131ms.
[info] [phantom] Step _step 15/17 https://site.brand.eu/link/ (HTTP 200)
[info] [phantom] Step _step 15/17: done in 3155ms.
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link//Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail (HTTP 302): https://site.brand.eu/link/Login.aspx
[debug] [phantom] Automatically injected includes/jquery-3.3.1.js client side
[warning] [phantom] Casper.waitFor() timeout
[error] [phantom] Wait timeout of 20000ms expired, exiting.
Wait timeout of 20000ms expired, exiting.
[debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "about:blank"
I've tried to run the script on my local machine - it succeded, but can not on my remote centOS machine. 我尝试在本地计算机上运行脚本-成功,但是无法在远程centOS计算机上运行。
PS 聚苯乙烯
It was fine for over a year... 一年多没事...
As I mentioned above - the platform is centOS. 如上所述,该平台是centOS。 It's hilarious but...
这很有趣,但是...
sudo yum update
Then: 然后:
sudo reboot
Mission accomplished. 任务完成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.