I've created a new package, org.mozilla.mcp:  Mozilla Control
Program.  This package contains features that take webclient toward
providing a first class browser automated testing capability similar
to what HtmlUnit provides, however in this case there is a real
browser underneath.

It would be nice to just have HtmlUnit *use* webclient in this way,
but I don't think that's realistic given the binary constraints of
webclient.  To that end, I'm investigating what the best integration
strategy is for MCP.  Two options:

1. Just create MCP as a new API on top of webclient, optimized for
ease of use in testing Ajax applications.

2. Look for some way to leverage the HtmlUnit API so that an HTMLUnit
test has its browsing capability provided by webclient.

The first step was to add the ability to get the X and Y coordinates
of an arbitrary DOM node, which can be found by id.  Oddly, this
didn't appear to be in the core W3C dom spec so I implemented it with
smaug on #developers help.  Here is the change-bundle:

M dist/mcp-test/src/test/java/cardemo/CarDemoTest.java

- Underpinnings for "clickElementWithId"

M dom/jni/Makefile.in

- depend on layout, for nsIBoxObject.  Thanks smaug.

M dom/jni/javaDOMGlobals.h

- copy over WC_ITOA macro

M dom/jni/org_mozilla_dom_ElementImpl.cpp

- add support for special attributes screenX, screenY, clientX,
clientY

M webclient/build-tests.xml

- compile the CarDemoTest

M webclient/classes_spec/org/mozilla/mcp/MCP.java

- add getElementInCurrentPageById()

M webclient/test/automated/src/classes/org/mozilla/webclient/
DOMTest.java

- exercise new features in dom ElementImpl.

I'm working toward an alpha 6 release.

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to