Comments (7)
Hi @dpilafian, thank you for the comment.
The test-page-loader works fine in a headless browser such as PhantomJS because it only handles DOM (makes iframe
s and loads pages), it does nothing to the browser.
from test-page-loader.
I waited for it, and no reply came, and I close this issue.
from test-page-loader.
I did get it hooked up, but the iframe
remains empty (even though the src
attribute gets correctly set). This may be due to the same-origin policy restriction.
from test-page-loader.
If you don't make the browser run correctly about security, it should throw an Uncaught DOMException error. You can find that error in the log. It is unrelated to the test-page-loader.
Try this: https://github.com/anseki/test-page-loader#examples
from test-page-loader.
BTW,
You'd better make sure whether that iframe
is really empty or it looks like empty because JavaScript can't run.
For example, try to load a page that doesn't contain JavaScript.
from test-page-loader.
Yes, the iframe
really is empty.
This is not a bug in test-page-loader. However, the security issue does appear to make it impractical to use test-page-loader to load an HTML page into a headless Jasmine spec.
from test-page-loader.
I have never read your code, but at least, I'm using PhantomJS v2.1.1 + Jasmine v2.5.2 + test-page-loader without any problems. The test-page-loader works with PhantomJS, and Jasmine outputs that report perfectly.
As I said before, you'd better check the log (page.onConsoleMessage
). Because that error message should be output if it has the security problem.
Also, if your code really has a problem about the same-origin by locally accessing, the code I gave will help you.
from test-page-loader.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-page-loader.