Photo from Chile

CFSelenium 1.7 - Upgrades for Selenium 2.16 and Firefox 9

A new version of CFSelenium was released today which upgrades the bundled version of Selenium Server to version 2.16.0, and also provides Firefox 9 (and above) compatibility for the bundled Firefox plugin.

As always, the latest version is available via the CFSelenium RIAForge page and via the CFSelenium GitHub Project.The latter also includes a detailed Readme file which can help you get started using CFSelenium.

ValidateThis 1.1 - User Contributed Fixes and Features

Just a quick note to announce the release of version 1.1 of ValidateThis, an awesome validation framework for ColdFusion. This version includes one new validation type, notRegex, which was contributed by John Whish, and a bunch of small fixes, contributed by Greg Moser.

For those of you reluctant to use a 1.0 version of anything, now that we've got 1.1 out the door you can grab it and give it a try! Here are some resources that will help you:

So what's stopping you? Go download the latest and greatest version of ValidateThis and take it for a spin!

ValidateThis 1.0 - A True Community Effort

I am pleased to announce that ValidateThis, an awesome validation framework for ColdFusion, has finally gone gold! That's right, version 1.0 of the validation framework that you've come to know and love is in the wild. While I'm proud of the framework, I'm even prouder of the number of developers who contributed to this release. In addition to me, the following people made a contribution:

Most of went into this release won't be noticeable to the developer, or at least won't affect the way you interact with the framework. Here's a quick summary of the changes in this release:

  • Upgraded to the latest version of the jQuery Validation plugin, which replaces jquery.validate.pack.js with jquery.validate.min.js. If you are loading this file yourself (as opposed to using a CDN, which the framework does by default), then you should replace that file.
  • The default generated failure messages are now identical on the client and server, and are based on information in a resource bundle. This means you can easily change the default generated failure messages if you wish, and the changes will be reflected on the client and the server.
  • Thanks to John Whish (who I have unilaterally appointed as client-side-czar for the framework) the Javascript that is generated has been greatly improved. Many of the changes that John made were based on suggestions from Dan Switzer.
  • You can now store your definition files in a folder structure that mirrors a dot-based naming scheme for components.
  • You can now instruct the framework to ignore missing properties in your objects, as opposed to throwing an exception if a property is missing.
  • A new config option has been added: vtFolder which you only need to use if the framework resides in a folder that isn't called ValidateThis and you are on a case-sensitive system.

The biggest change is the second one mentioned above: the default generated failure messages. If you are currently using the i18n capabilities of the framework this may affect you, so I suggest you read the i18n information available in the online documentation.

If you've been holding off checking out the framework until it reached version 1.0 (silly people), now's the time to get cracking. Here are some resources that will help you:

So what's stopping you? Go download the latest and greatest version of ValidateThis and take it for a spin!

cf.Objective() 2012 - Call For Speakers and Topic Suggestion Survey Now Open!

The Topic Suggestion Survey and the Call for Speakers for next year's cf.Objective() are both now officially open. For more details please check out the announcement at the cf.Objective() site, or if you're keen to get started, visit the Engage app right now to suggest and vote on topics or to propose to speak.

My Adobe ColdFusion Developer Week Session on ORM

I was very pleased that my CF Dev Week presentation was so well attended and received. I am attaching a PDF of the presentation materials to this post. Once the recording is available, you'll be able to find it at www.adobe.com/devnet/coldfusion/events.html.

CFSelenium 1.6 - Upgrades for Selenium 2.2 and Firefox 5

A new version of CFSelenium was recently released which upgrades the bundled version of Selenium Server to version 2.2.0, and also provides Firefox 5 compatibility for the bundled Firefox plugin.

As always, the latest version is available via the CFSelenium RIAForge page and via the CFSelenium GitHub Project. The latter also includes a detailed Readme file which can help you get started using CFSelenium.

CFSelenium 1.5 - With Some Handy Helper Methods

A new version of CFSelenium was recently released which includes a few helper methods that I've found useful. First off, I'd like to thank the fine folks on the Mozilla Web QA team, from whom I borrowed the idea for these methods. I wrote a couple of tests for them in Python, and their Python base page object contains these methods. While I agree that it makes sense to include these methods in a base page object, not everyone using CFSelenium is using the Page Object Model, and as the creator and co-maintainer of CFSelenium I figured I'd just make everyone's life simpler and include them directly in the client library.

The three methods, which are waitForElementPresent, waitForElementVisible, and waitForElementNotVisible, are helpful when testing applications that make use of AJAX, or even just simple JavaScript. When you want to check that a page has responded to a user interaction, and the response is generated by JavaScript, you can often run into timing issues in your Selenium tests. If you issue a click command and then immediately include an assert with a getText command in it, it may be that the element that you are attempting to get hasn't been created by the browser yet. The same can be true when elements are shown or hidden. To address this issue the three methods mentioned above can be used, each of which is described in more detail below.

Arguments

Each of these methods accepts one required and one optional argument. The first argument, locator, is just that; the locator of the element that you want to wait for. The second, optional, argument is timeout, which is a number, in milliseconds, that you want CFSelenium to wait for the element before it throws an exception. The default value for timeout is 30000 (or 30 seconds), and this can be overridden in one of two ways. You can override the default for your entire test case by passing a value into the waitTimeout argument of CFSelenium's init method. You can also override the default on any call to any of these methods by passing a value into the second argument of the methods, which is timeout.

waitFor Methods

In case it isn't completely obvious, here is what the waitFor methods do:

  • waitForElementPresent - Waits for the specified element to be added to the DOM. If the element is not present by the end of the timeout interval an exception is thrown.
  • waitForElementVisible - Waits for the specified element to become visible. If the element is not visible by the end of the timeout interval an exception is thrown. Note that the element must be present in the DOM or the Selenium server will throw an exception immediately.
  • waitForElementNotVisible - Waits for the specified element to become hidden. If the element is still visible by the end of the timeout interval an exception is thrown.

As always, the latest version is available via the CFSelenium RIAForge page and via the CFSelenium GitHub Project. The latter also includes a detailed Readme file which can help you get started using CFSelenium.

Previous Entries / More Entries