bobsilverberg / cfwebdriver Goto Github PK
View Code? Open in Web Editor NEWWebdriver binding for ColdFusion.
Webdriver binding for ColdFusion.
Last Updated: Thursday, 10-02-2008 Experimental Webdriver Binding/port for ColdFusion -------------------------------------------------------------------------------- Recommendations before starting: This setup is intended for individual developer use and not for a shared environment. For the Firefox driver, Webdriver needs access to the APPDATA environment variable. If the server is started under a local system account, this may not exist, and return NULL. In this case, Firefox and likely IE will not run. This issue has been fixed by Webdriver and should be available in the near future. The HtmlUnit driver still runs in this case. So, it's recommended that the developer be the account that started the cf server. Review the docs at http://code.google.com/p/webdriver for general information. Basic Process: Copy Webdriver jars to the CF class path, edit any required configuration file (not required with Railo), and restart the CF server. Copy the cfwebdriver components somewhere into the webroot and then have at it. It is also assumed that you have downloaded, installed, and are familiar with MXUnit - http://mxunit.org Installation Notes: The main task with getting up and running is at the server level. The Webdriver jars needs to be loaded into the CFML server class path. This is typically done by placing the jars in a directory that loads all jars when the server starts. You may need to specify this in some class path setting such as in WEB-INF/web.xml or in runtime/bin/jvm.config file. Determining where this is depends upon the server type your are running. If you are running Adobe CF8 Multi-Instance, you should be able to modify the web.xml file to load the directory of jars. In a single server instance, you might need to edit the jvm.config file. In either case, it may be required to make sure the Webdriver jars are loaded first, in order to avoid conflicts, such as commons-logging conflicts. -------------------------------------------------------------------------------- Installation Version 1 Adobe ColdFusion: 1. Copy /webdriverlib to WEB-INF/lib/webdriverlib 2. Edit WEB-INF/web.xml adding the path to the webdriver jars above to the BEGINING of the cf.class.path element: <context-param id="coldfusion_context_88"> <param-name>cf.class.path</param-name> <param-value> ./WEB-INF/lib/webdriverlib,./WEB-INF/cfusion/lib/updates,./WEB-INF/cfusion/lib,./WEB-INF/cfusion/gateway/lib,./WEB-INF/flex/jars,./WEB-INF/cfform/jars</param-value> </context-param> This is needed to make sure the commons logging classes are loaded first and override ColdFusion's logging. NOTE: I don't know how this affects CF logging or other apps. It might be best to create a new CF instance for this kind of app or web testing ... 3. Restart CF. 4. Try the tests example1.cfc and GoogleAjaxTest.cfc -------------------------------------------------------------------------------- Installation Version 2 Railo 3.00.003: 1. Put all the jars from /webdriverlib into {railo_install}/lib 2. Restart Railo 4. Try the tests example1.cfc and GoogleAjaxTest.cfc -------------------------------------------------------------------------------- Tips: If you don't want to use the ColdFusion components, all the more power to you! Just instantiate the java objects and call their methods. In addition to the Webdriver classes, the full HtmlUnit api is available for your testing pleasure. -------------------------------------------------------------------------------- General Tests: The FF driver works well. Remember, CF should be running under your account so it can find Firefox. The HtmlUnit driver is fast, but does not support javascript well. -------------------------------------------------------------------------------- Known Issues: Internet Explorer fails to load for unknown reasons. Methinks it might have something to do with how IE shuts down after an exception. It may still be running in the background. New IE Webdrivers are on the way. FF also does not load "sometimes" ... Http authentication is not implemented. So, not BASIC or NTLM yet. Maybe extend the drivers or contribute to Webdriver the desired authenticateAs(...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.