I am able to record my actions (for a XUL application) using casper, and it allows me to save the file as .js, but I can't figure out how to play a test file.
If you use the "Create UnitTest" button on the casper Test Recorder dialog, you can save the current events as a testcase file. When you want to run this test file, use the casper Xul Test Runner and select the directory where the testcase file resides, click on the "Runner" tab and then click the "Run Tests" button.
Thanks for the information. I had done pretty much everything you suggested except that I didn't realize Run Tests was a button.
I am still having one problem, when I tried to playback some actions that I had recorded, the test fails with the result, Result: evt.target has no properties.
I am not familiar with the casper code, so just wondering if there's something I could do to fix things.
This looks like it is a bug. I don't know much of the casper code, but from a quick test it looks like the xpath lookup is failing for the test file's eventList, there are quite a lot of exceptions dumped to the console after running a testcase (you should be able to see this in the Komodo pystderr.log). http://community.activestate.com/faq/komodo-file-locations#log_files
I am not using komodo (I simply downloaded casper and ran it on firefox), so I was unable to find the error log files (I even did a search with the look for hidden files enabled).
Is there any other place where the error log file might be located?
Hmmmm.... it may be recorded in the Firefox error console, else you'll need to enable the firefox "browser.dom.window.dump.enabled" config variable, see: http://kb.mozillazine.org/About:config_entries
and then run firefox with the console open "firefox -console" I think...
I checked and it does not get recorded in firefox error console.
So I enabled browser.dom.window.dump.enabled and opened it using -console and it gave some kind of an error log. I was wondering if there is anyway to save it asa text file or something, so I can send it as an attachment?
If you use the "Create UnitTest" button on the casper Test Recorder dialog, you can save the current events as a testcase file. When you want to run this test file, use the casper Xul Test Runner and select the directory where the testcase file resides, click on the "Runner" tab and then click the "Run Tests" button.
Cheers,
Todd
Hi Todd,
Thanks for the information. I had done pretty much everything you suggested except that I didn't realize Run Tests was a button.
I am still having one problem, when I tried to playback some actions that I had recorded, the test fails with the result, Result: evt.target has no properties.
I am not familiar with the casper code, so just wondering if there's something I could do to fix things.
Thanks in advance.
This looks like it is a bug. I don't know much of the casper code, but from a quick test it looks like the xpath lookup is failing for the test file's eventList, there are quite a lot of exceptions dumped to the console after running a testcase (you should be able to see this in the Komodo pystderr.log).
http://community.activestate.com/faq/komodo-file-locations#log_files
I'd recommend filing a bug on this, hopefully Shane can get some time to look at the problem:
http://bugs.activestate.com/enter_bug.cgi?product=komodo
Cheers,
Todd
Hi Todd,
I am not using komodo (I simply downloaded casper and ran it on firefox), so I was unable to find the error log files (I even did a search with the look for hidden files enabled).
Is there any other place where the error log file might be located?
Thanks in advance.
Hmmmm.... it may be recorded in the Firefox error console, else you'll need to enable the firefox "browser.dom.window.dump.enabled" config variable, see:
http://kb.mozillazine.org/About:config_entries
and then run firefox with the console open "firefox -console" I think...
Hi Todd,
I checked and it does not get recorded in firefox error console.
So I enabled browser.dom.window.dump.enabled and opened it using -console and it gave some kind of an error log. I was wondering if there is anyway to save it asa text file or something, so I can send it as an attachment?
Thanks.