In article <a05193b8-46cd-4d17-a8d4-fb9106d3a...@n32g2000pre.googlegroups.com>, crow <wen...@gmail.com> wrote:
> Hi, I'm writing a test tool to simulate Web browser. Is there anyway > to run JavaScript in python? Thanks in advance. The answer to the question you asked is, "Probably. You might want to check out SpiderMonkey as a starting point". The answer to the question you didn't ask is, "Before you invest a lot of effort in this, check out Selenium". http://en.wikipedia.org/wiki/SpiderMonkey_(JavaScript_engine) http://en.wikipedia.org/wiki/Selenium_(software) Another thing to think about is whether you really do need JS to test your web app. Depending on how much your app depends on JS for its core functionality, you may find that just using urllib to fetch pages, parsing the HTML with lxml, and verifying that certain data exists in the appropriate HTML elements might get you 80% of the testing value for 20% of the effort. But, I digress. -- http://mail.python.org/mailman/listinfo/python-list