I have just committed an extension to the command handler framework so that assert, assertNot, verify, and verifyNot are all generated automatically from no-arg getters. Previously it only worked with single-arg getters.
As a result of this, I have now rewritten assertTitle, assertAbsoluteLocation, assertAlert, assertConfirmation, and assertPrompt as getTitle, getAbsoluteLocation, getConfirmation, and getPrompt.
As a consequence, we now have commands like assertNotTitle and assertNotAbsoluteLocation etc.
Can someone please try this out in Konquerer and/or Safari?
Still to go:
- do similar things for predicates like isElementPresent, isVisible, isTextPresent...
- automatically generate storeXXX from getXXX and isXXX
- automatically generate waitForXXX and waitForNotXXX from getXXX and isXXX.
- update user docs.
Not sure what to do about assertSelected.
Currently you specify what you want to compare against (value, label, index, or id) in the value field:
e.g.
assertSelected | foo | value=bar
This can easily be transformed into an isSelected(locator, qualifier=expected) method, but this is a little limiting. e.g. storeSelected would store true or false.
Better might be getSelected([EMAIL PROTECTED]) so that you can store the actual value rather than just true/false.
Asserts would then look like:
assertSelected | [EMAIL PROTECTED] | bar
This also needs to be generalized further to multi-selects. Maybe something like:
assertSelected | [EMAIL PROTECTED] | one,two,three
Not sure where you would throw in the pattern matching qualifiers like regexp and exact.
Maybe PatternMatcher could be extended somehow to support a syntax like:
assertSelected | [EMAIL PROTECTED] | list{one,regexp:f[aeiou]o,exact:f*?}
Anyone got some better ideas?
David Kemp
ThoughtWorks Australia Pty Ltd
http://www.thoughtworks.com
_______________________________________________ Selenium-devel mailing list Selenium-devel@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel