Add "format" attribute to timestamp event

This change adds the optional "format" attribute to the timestamp event.  Using
this attribute allows arbitrary date/timestamp formats to be used.  For a
complete description of allowable formats, see the java 6 documentation at:
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html

Testing done:

Ran the following test script:

<soda>
   <timestamp/>
   <timestamp format="yyMMddHHmm"/>
   <timestamp format="zebra"/>
</soda>

The first two worked, and the third produced an error due to the invalid format.
Plumb --profile command line option

This change implements the --profile command line option.

Testing done:

Tested on Firefox with profile directory, invalid profile directory, and no
profile specified.
Reopen browser window when loading url

If the browser window has closed and the browser event is called with the
url attribute, this change causes VDD to reopen the window and then load the
URL.

This functionality is not currently used by the test suite, but it is very
handy for VDD regression tests.

Testing done:

Many iterations of the new sugarwait test, which closes and opens the window
several times.
Create SugarWait regression suite

Since SugarWait is such a fundamental component of testing Sugar with VDD
and it has proven in the past to have complicated interactions with VDD,
Sugar, and Selenium, it just makes sense for it to have its own regression
test.

The test added in this change hits all the corner cases of SugarWait that
have proven troublesome and also the normal cases as well.

This test is not being made part of the regular VDD regression suite due to
its slightly more complicated setup than the rest of the suite (path to
the plugin file must be specified for this test only), and also because
VDD changes rarely impact SugarWait functionality.

Testing done:

Many iterations of this test against SugarWait with output compared to
what it should be.
Bug 60042: Modify text search

This change reverts plain text search to the older behavior of matching
entire strings rather than part.

Testing done:

Ran Accounts_0261.xml, which was failing to <attach> to a window due to
an invalid window title match.
Bug 60042: Give TextFinder another search method

Some clients of TextFinder expect to match the complete text, and others
expect to match within the text.  This change adds a findExact method for
those clients that want a complete match.  The find method searches for
matches within the text.

Testing done:

Ran against a test script that uses all clients of TextFinder: PageAsserter,
<attach>, and assert/assertnot.
Sort the test files in a fileset.

An earlier change left out a sort of the tests in a fileset.  This change
restores that sort.

Testing done:

Ran against a suite with a fileset.  Before the change, tests were in a
"random" order.  After, they were sorted alphanumerically.
Use the timeout value when finding elements

Only one of the three methods in the Browser class for finding elements was
being used and only from one call site.  Most calls to findElement were
calling selenium directly, and, as a result, not honoring the timeout value
specified in the event.

This change fixes that by creating a wrapper around selenium's findElements
in EventLoop and deleting the methods in Browser.

Testing done:

timeout-specific test.  VDD regression suite.
Add the timeout attribute to all events

This change adds the timeout attribute to all the events that don't already
have it.

Testing done:

timeout-specific test.
Add --eventtimeout command line option

The --eventtimeout command line option sets the timeout value used when
searching for elements on the page.  Setting it is equivalent to using
the timeout attribute on all events.

Testing done:

timeout-specific test script with and without --eventtimeout
Add the eventtimeout option to the config file

With this change, eventtimeout can be specified in the config file as a cmdopt.

Testing done:

timeout-specific test with all combinations of eventtimout.
Dismiss unexpected alerts when closing browser

Though browser closure through the browser event has been able to handle
unexpected alerts for some time, the restart test machinery was missed
(since it's handled at the VooDooDriver level).

This change fixes that omission.  Also, since the FirefoxDriver doesn't seem
to actually throw UnexpectedAlertExceptions in the presence of unexpected
alerts (it throws a JavaScript Error(!)), the scope of exception handling
is expanded to WebDriverException.

Testing done:

Ran a test with one script leaving an alert open prior to running a
restart test.  Both firefox and chrome handle that now.
Append to voodoo.log

VDD's voodoo.log output file was being created anew with each run.  When
there's only one output directory per run, that is fine, but on jenkins,
the output directory is reused which meant that only the output of the last
run was being preserved.

This change adds the append flag to voodoo.log creation, ensuring that all
output is captured.

Testing done:

Ran VDD multiple times with the same output directory.
Add window maximize/restore support to VDD

This change adds to VDD the ability to maximize and restore the browser
window.  In order to do so, the browser event is used like so:

   <browser action="maximize"/>
   <browser action="restore"/>

In addition to this functionality, a new command line option and config file
cmdopt have been added, --maximizewindows and maximizewindows, respectively,
that, when set, automatically maximize all browser windows as they're
created and get the focus.

Testing done:

Ran test scripts that exercised the browser actions, and that tested
the auto-maximize of both primary windows and attached windows.
Bug 60284: Prolong watchdog timeout during <wait>

This change adds logic to VDD to prevent a watchdog timeout that could be
caused by a long <wait> event.  Now, during wait events, the watchdog timer
is extended by the duration of the wait.

Testing done:

Ran test script with long waits.
Bug 61860: Add timeout attribute to alert event

This change adds the timeout attribute to the alert event with a default
value of two seconds.

Testing done:

Ran against a test with a delayed alert.  Without the timeout, the alert
wasn't seen.  With a timeout, the alert was after the delay.
Bugs 61883 and 61884: Restore regex delims

During the overhaul of regular expression and text searching in VDD, an attempt
was made to normalize the handling of regular expression input by only
actually doing a regular expression search if the provided string is a
regular expression.  As part of that, the "/" delimiters in use were ignored
and stripped.  As it turns out, that was a bad idea since searches are done
using regular expression metacharacters in the expectation that they'll be
a plaintext search (bug 61883).

The fix is simple: in order to be considered a regular expression, a provided
string must both contain metacharacters and be delimited by "/".  The real
strangeness, that the XML tag for both text and regex searches is <regex> is
left alone.

Testing done:

Various searches with various strings.  Correct behavior seen in all cases.
Strip / delims

This is a follow-up to the previous change.  If a provided search string is
intended to be a regex, but contains no regex metacharacters, VDD treats it
as a plain search string.  The previous change neglected to remove the /
delimiters; this change does so.

Testing done:

Search script using attach title="/.../".
Bug 61891: Add assert/assertnot to td event

This change adds the missing assert and assertnot functionality to the td
event.

Testing done:

td event with assert and assertnot
Bug 62013: Allow child events of link

This change allows child events of the link event.

Testing done:

Ran a script with children of <link>