편집 : 이것은 Windows의 동작으로, Linux에서만 작동합니다.CasperJS- 사이트에 등록하고 Gmail에서 보낸 메일의 유효성을 검사합니다 .- 슬림하고 유령 모두 -
첫 번째로 캐스퍼를 사용하여 Gmail을 탐색하는 데 성공하면 (임의 대기 시간 - 20 초에서 5 분 -), 알려주세요.
Google 사이트에 등록하고 Gmail (전체 등록 단계)을 통해 자동으로 내 등록을 확인하고 싶습니다. 누군가 이전에 그렇게 했습니까?
등록 할 때 아무런 문제가 없으며 내 사서함 (Gmail)에 로그인 할 수 있지만 Gmail에서 내 등록을 확인하고 확인하는 데 문제가 있으며 phantomJS와 slimerJS간에 서로 다른 동작을 관찰합니다.
팬텀에서는 특수 명령없이 작동하지만 다음 단계 (waitForSelector)에서 통과하기까지 5 분 정도 걸릴 수 있습니다. 그리고 slimerjs로 그냥 사서함 페이지에 붙어있어.
EDIT : 이상한 점 : 팝업이 열리는 링크를 수동으로 (슬리머로) 클릭하면 차단되는 것을 멈추고 내비게이션이 계속 진행되며 단계 자체의 끝을 감지 할 수없는 것과 같습니다. 다른 상호 작용없이 제출 클릭 후 waitFor를 수행하십시오. 새로 고침/다시로드 문제입니까?
것은 그 자신을 확인하십시오 :
casper.thenOpen('https://accounts.google.com/ServiceLogin?service=mail&continue=https://mail.google.com/mail/&hl=en', function(){
this.sendKeys("input#Email","your mail");
this.sendKeys("input#Passwd","your password");
this.click("input#signIn.rc-button-submit");
console.log(this.getCurrentUrl());
this.waitForSelector(".aeF",function(){//fail with linux -> timeout
this.test.pass("ok"); //windows -> stuck in slimer, several times in phantom
this.test.assertExists(".T-I.J-J5-Ji.T-I-KE.L3","Gmail Home ok");
console.log("url "+this.getCurrentUrl());
});
그리고 난 모든 시간 초과 오류가 발생하지 않습니다. slimerjs에서는 그냥 페이지를 열어 두었습니다.
waitForUrl 대신 waitForPopup을 수행하면 오류 (시간 초과 -> 팝업되지 않음)가 표시되는데 왜 waitForUrl/waitForSelector ...가 멈추지 않습니까? 나는 시도했다 - 웹 보안 = 아니요, - ignore-ssl-errors = true 명령 (링크되지 않았지만 시도했는데 --output-encoding = ISO 8859-1도 작동하지 않음). 여기
팬텀과 slimer (문서)의 차이 : 문제가 아약스에 기본 Gmail은 루프입니다 : 는