From: Brad C. <yo...@br...> - 2005-04-20 16:39:07
|
Define "text" :D Anything appearing in source from the server? Anything in the generated XML DOM? Text that -could- be visible to browsers? Text that -is- visible? XML comments? With or without whitespace compression done by browsers? Including <script> blocks that have already been executed? Including included JavaScript files? CSS files? I strongly suggest not looking for anything this way and using the classes provided by HtmlUnit to more specifically look for things you expect/don't expect to exist. While I do this sort of text searching myself in a couple of places, I keep it very isolated and completely hidden from my actual test cases. The -only- reason I do it at all is because the server I'm testing against can produce errors at any point in the source code and there is no other reliable way to detect these errors (it's really not that reliable but it's all I got). Brad C --- Ducloux Victor <vdu...@co...> wrote: > Hi everybody, I succeeding in doing some things with htmlunit and forms... > but now I would like to know how to search a certain text in a web page > like 'Welcome to my web page'... > > I really can't find out in the api doc.... > Thanks in advance, > > > Victor > > -- > > > Victor Ducloux | Stagiaire > Tél portable : +33 6 60 41 76 03 > > *c o s m o s b a y ~ v e c t i s* > > 10, rue du Faubourg Poissonnière - 75010 Paris - > www.cosmosbay-vectis.com > Tél général : +33 1 53 24 67 80 - Fax : +33 1 53 24 67 89 > > > |