Re: [Webunitproj-users] how to retreive inner text from WebTag?
Brought to you by:
dgan
From: Doron <dg...@sh...> - 2002-11-06 15:03:43
|
Hi Brian, Yes, there is a way, but it requires you to make some changes (which we'll add back to cvs). I assume you simply want to select the DIV in which case using the "ID" is much better. If its to actually check for expected data then that's a different story. So to make this happen: 1)Change the DefaultWebTag to take in tagText. 2)Change WebTag interface to add a method "getTagText()" 3)Change the code in the areas the compiler will complain about so that tag text is passed in. You can also change the WebOption class to use the stuff that comes from the DefaultWebTag since it is a subclass of that. If you have any questions, please let me know. -Doron p.s. Please post your changes (to any of the Java files) in the patches area and send a note to the list. This will make Erik or I add the changes to CVS. On Tue, 2002-11-05 at 18:37, Brian Knorr wrote: > Is there a way to get the inner text from a Webtag? I noticed the > WebOptionField class provides this, however we would like to grab the > inner text from any tag... for example, if we have the following <div > id="orderNumber">1234567</div> we would like to be able to grab the > inner text "1234567". Currently this is halting our progress... please > advise.... thanks. > > > > Brian > > |