From: Brad C. <yo...@br...> - 2005-06-08 18:07:44
|
Tables are no different than any other type of element. You can use XPath: http://htmlunit.sourceforge.net/phpwiki/index.php/XPathExamples or any one of the many methods found in the unit tests: http://cvs.sourceforge.net/viewcvs.py/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/ --- dko...@mo... wrote: > In the example for accessing tables on a page, the method > getHtmlElementById is used. What about cases where the table > has not been assigned any id? For example: > > <html lang="en"> > <HEAD> > <base href="http://clack:1095/patient/Login.jsp"> > <TITLE>Avitek Medical Records</TITLE> > <link rel="stylesheet" type="text/css" href="stylesheet.css"> > </HEAD> > <BODY bgCOLOR=white TOPMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" > MARGINWIDTH="0" MARGINHEIGHT="0"> > > <!-- Title Bar Start --> > <TABLE class=pagetop WIDTH='100%' BORDER=0 CELLSPACING=0 CELLPADDING=0> > <TR> > <TD><BR> <SPAN class=head1><FONT COLOR=white>Avitek Medical > Records</FONT></SPAN><BR></TD> > <TD align=right><IMG SRC='images/logo.gif'></TD> > </TR> > </TABLE> > .. > > Thanks, > Dave |