0
주어진 웹 사이트에있는 양식을 모두 검색하려면 어떻게해야합니까? 특히 폼의 ID와 이름.웹 페이지의 모든 양식 검색
감사 간단히 통해 비 원시적 인 개체를 전달 평가할 수 없습니다 또한
var page = require('webpage').create();
page.open('yoursitehere', function (status) {
if (status !== 'success') {
console.log('unable to access network');
} else {
var forms = page.evaluate(function(){
//best way here
return document.forms;
});
//some stuff here
console.log(forms.length);
console.log(forms[0].name);
}
phantom.exit();
});
같은, 메모와 함께