phantomjs not showing form fields

白昼怎懂夜的黑 提交于 2020-01-05 19:21:10

问题


I am using following js script to phantomjs on ember site running locally:

//test_phantomjs.js
require('phantomjs-polyfill');

var page = require('webpage').create();
page.open('http://localhost:4200/', function(status) {
  console.log("Status: " + status);
  if(status === "success") {
    page.render('example.png');
  }
  phantom.exit();
});

The command I run the test this script is as follow:

phantomjs --remote-debugger-port=9001 --remote-debugger-autorun=yes test_phantomjs.js 

I am suppose to get login form, but instead I am not getting the form just an empty page.

however if change the url to development ember app, then I get the full page with form fields.

How can I fix it for locally running ember app so I can test this with poltergeist?

来源:https://stackoverflow.com/questions/34095210/phantomjs-not-showing-form-fields

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!