[Zope3-dev] XPATH in zope.testbrowser, assertions in zope.testrecorder

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Jun 24 21:06:39 EDT 2006


On Saturday 24 June 2006 19:49, Martin Aspeli wrote:
>    In this case, having the ability to select nodes by XPATH would be
> incredibly useful - both for getControl()/getLink(), and for doing
> assertions (fail if/unless this node exists). I imagine an existing
> library would be available to make this reasonably easy to implement?

Yes, I have done that in SchoolTool already. It uses straight libxml2, so no 
fancy lxml or ElementTree, but it works well. We use it far too little. The 
code is here:

http://source.schooltool.org/viewcvs/trunk/schooltool/src/schooltool/testing/analyze.py?rev=5667&view=auto

And here it is used:

http://source.schooltool.org/viewcvs/trunk/schooltool/src/schooltool/commendation/Viewing.txt?rev=6137&view=auto

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list