Hi!

While evaluating jWebUnit I started to miss a way to assert certain elements. 
My problem is a not-so-nice markup, that lacks IDs and names. I therefore need 
to use a loot of XPath to assert the structure and existence of certain 
elements. While I can write a XPath expression to count the number of columns 
in the second table inside a certain div, there is no way to check this with 
jWebUnit. 
As jWebUnit is hiding implementation via the plugin API, there is no way to 
directly access eg. the htmlUnit API.

Another problem I had while working with clickElementByXPath() and 
assertElementPresentByXPath():
Eg. I want to click the second link in a table with this expression:
clickElementByXPath("//[EMAIL PROTECTED]'portletMVC']/table//a[position()=1]");
It always clicks the first link, seems like the parts in brackets is ignored. 
Also very confusing: assertElementPresentByXPath("//[EMAIL 
PROTECTED]'portletMVC']/table/tr/td");
There is a table with tr childs and trs whith td childs, but the assertion 
fails.
This only works this way:
assertElementPresentByXPath("//[EMAIL PROTECTED]'portletMVC']/table//tr//td");
Not quite want I'd like.

Any ideas?

Best regards,
Jörn
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
Jwebunit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to