Using ColdFusion within Selenium
Selenium only cares the output is in its simple table structure. Please refer to Sebastien Lachance's post about Structure of an html test and James Netherton's post about Selenium suites . I use the Firefox IDE to initially create scripts and save as a cfm file. Then add the ColdFusion sweetness.
Here is a simple use of ColdFusion within a Selenium test script to create a random email address. This would be useful when needing unique email addresses for testing a create new user process.
<cfset r = Randomize(5)>
<cfset email = "#email@example.com">
Generating dynamic test scripts are easy. Here is an example of looping through all the options of a select statement with a query and verifying after submitting.
<cfquery name="selectOptions" datasource="DS">
select select_id, selectName from selectTable
<!— loop through select options—>
<!— more checks, actions, and then return back to form —>