Giter Club home page Giter Club logo

cfwebdriver's Introduction

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(...)











cfwebdriver's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.