Support Forum
When i run the phantmjs <urltomytesthtml> i sometimes get that Ext is not defined. Sometimes i get it to work but all tests fail.
Is there a good way of finding out what is happening. Debugging?
The tests works fine running them in browser on autolaunch. The tests differ in complexity but in command mode they all fail.
Is there a good way of finding out what is happening. Debugging?
The tests works fine running them in browser on autolaunch. The tests differ in complexity but in command mode they all fail.
Well, the only way of debugging in phantomjs is using "t.diag(message)". Tests may fail because of different rendering engine - phantomjs is using Webkit (not the latest version). In general, running tests in phantom should be equal to running them in Safari. Do you see the same failures in Safari?
Read the API documentation
Might be also a fixed bug - we'll update the beta package tomorrow (it will also have the Selenium integration capabilities )
Read the API documentation
Are you loading ExtJS from their CDN? If so can you try to switch to localized version and check this issue?fredric berling wrote:When i run the phantmjs <urltomytesthtml> i sometimes get that Ext is not defined. Sometimes i get it to work but all tests fail.
Is there a good way of finding out what is happening. Debugging?
The tests works fine running them in browser on autolaunch. The tests differ in complexity but in command mode they all fail.
Read the API documentation
Do you use "https" perhaps? I saw somewhere in phantoms wiki that some builds of phantom does not support https.
Read the API documentation
Also - where does your preload reside? Can you open the preload url using some of the phantomjs examples?
Read the API documentation
BTW i tried running it programmatically using WebPage object:
var page = new WebPage();
page.viewportSize = { width: 1024, height: 768};
page.open('https://localhost:8080/myserver:port/app/index.html', function (status) {
if (status !== 'success') {
console.log('Unable to access the network!');
} else {
// what to do here
console.log('Successfully run the tests');
page.render('quickallote.png');
}
phantom.exit();
});
It seems to print fine, although the tests are not triggered automatically.
var page = new WebPage();
page.viewportSize = { width: 1024, height: 768};
page.open('https://localhost:8080/myserver:port/app/index.html', function (status) {
if (status !== 'success') {
console.log('Unable to access the network!');
} else {
// what to do here
console.log('Successfully run the tests');
page.render('quickallote.png');
}
phantom.exit();
});
It seems to print fine, although the tests are not triggered automatically.
- Attachments
-
- render capture from test
- quickallote.png (48.48 KiB) Viewed 8190 times