[Wtr-general] iec update: 2004.xxx.x
chrismo at clabs.org
Sat Jan 3 02:28:51 EST 2004
Been coding away on the IEC codebase in prep for Austin, while
simultaneously trying to fulfill some of the need for tests on IEC
itself. I just committed some new code -- here's the latest changelog
stuff in progress, though it ain't all necessarily working like I want
I'm trying to make sure all changes keep IEC backward compatible ... but
we don't have the tests to prove it right at the moment, though I do use
the lib 'in production' for my own personal use. Anyway, as I notify the
lists of these commits, if any of you want to get the latest from cvs
and try it out, please do.
* ClIEController.form now has optional param to automatically wrap the DOM
form instance in an IEDomFormWrapper instance.
* ClIEController.initialize now takes an options hash to specify, well,
options. Two options at this point: visible and auto_wrap_form. This
method is still backwards compatible -- if you pass in a boolean then
the visible variable is set and all others ignored.
* Big refactoring/improvements in accessing DOM nodes:
* IEDomFormWrapper used to have more funky code for wrapping widgets, now
it's a more flexible plug-in-ish, polymorphing structure, with a
separate subclass to wrap every node type (although only some node types
are supported yet -- see readme.txt). Supporting additional node types
will be much easier to add to the code now.
* There were some limitations because the previous code favored element
nodes instead of all nodes on the form. That's been fixed so that text
nodes are not discriminated against.
* Special code nonsense for ASP.NET labels has been removed, though should
still be supported.
* A new method_missing on ClIEController itself allows very easy access
to DOM nodes (in and out of forms) that have id/name attributes.
[there is still a little screwiness here using this method to talk to
some form inputs].
If the page has a link with an id like so:
<a href='http://clabs.org' id=clabs>cLabs.org</a>
You can simply call:
... to click the link.
Buttons with names/ids can be accessed the same way, other node
You can even add your own method_missing to forward calls to your @iec
instance so your test scripts can look something like this:
(unfortunately, assigning values to text inputs, for example, doesn't
work with this method_missing approach, because Ruby interprets this:
first_name = 'chris'
as a local variable assignment, and it's never passed to
method_missing. So it has to again be:
@iec.first_name = 'chris')
* WindowsFormWrapper code for use against .NET Windows Forms that have COM
interop enabled has been removed. This code lives in a file called
dotnet.form.rb that's back in the old cLabs scrapware cliecontroller CVS
Free solo piano album (mp3)
More information about the Wtr-general