Feature Requests item #1653557, was opened at 2007-02-06 20:46
Message generated for change (Comment added) made by henryju
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=1653557&group_id=61302

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Release 1.4
Status: Open
Priority: 5
Private: No
Submitted By: Aaron Loes (loesak)
>Assigned to: Julien HENRY (henryju)
Summary: Access to ALL elements by Id

Initial Comment:
I apologize if this is cryptic, this is my first feature submission.

I am currently working QA for a client with very detailed design requirements. 
Every element on a web page definition has a unique id associated to it. For 
testing, we use this unique id as the id attribute for the html elements.

We are looking at using jWebUnit to perform our validation, but we cannot 
verify every type of html element by id. Therefore, we extend WebTestCase and 
write our own assertions to verify by id. In these cases, we just assert the 
element exists and then assert the other condition (i.e. 
assertLinkWithExactText, etc). This, although a adequate option, can prove to 
yield false positives (The element with the id exists and the link with exact 
text exists but are not the same element).

Another need is to verify an element with the given id contains another 
element. Many of our id's had to be put in parent elements and it would be 
desirable to verify that such parent elements contain child elements (i.e. 
images inside links, links inside tables, other elements inside spans, etc.).

Not sure of best practice to implement this, but here is what I see as a 
preferred option:

* have overloaded functions for each assertXXX where an id is taken as an 
argument and the element with the id is verified to be the desired element 
(i.e. assertLinkWithExactText(String id, String text) asserts the element with 
given id is indeed a link and contains the exact text).

* have functions that verify the element with the given id contains another 
element (i.e. assertLinkWithExactTextInElement(String id, String text) verifies 
that a link with the exact text is contained in the element found to have the 
given id).

I believe the first suggestion is the most important as  all elements can 
contain id arguments, and it would be most helpful to find, and verify, those 
elements by their id.

The second suggestion is helpful as there are situations were you need to 
verify that an element has a desired child element. The only implementation 
that I have found is just the assertTextInElement, even though text does not 
have an element. 

(is lack of an element still an element?)

Please feel free to ask if you have questions.

I hope everything in this was clear, concise and spelt correctly.


----------------------------------------------------------------------

>Comment By: Julien HENRY (henryju)
Date: 2007-03-03 23:13

Message:
Logged In: YES 
user_id=1235926
Originator: NO

OK, I will try to improve this. But it will be for 1.5...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=1653557&group_id=61302

-------------------------------------------------------------------------
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-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to