From: Ahmed A. <asa...@ya...> - 2014-03-13 12:39:24
|
Hi Vasu, You can use page.getFirstByXPath() with "preceding-sibling" An example can be found in http://stackoverflow.com/questions/9879425/combining-xpath-axes-preceding-sibling-following-sibling Ahmed ________________________________ From: Vasudevan Comandur <vco...@gm...> To: "htm...@li..." <htm...@li...> Sent: Thursday, March 13, 2014 3:28 PM Subject: [Htmlunit-user] How to get the Label Text associated with a HTMLInput field where type=text Hi, I would like to know how to get the Label Text associated with a HTMLInput field where type=text in HTMLUnit I am copying below a snippet from an HTML page <label>Password:</label> <input type="text" id="otpMobilePassword" name="otpMobilePassword"> <br/> Regards Vasu ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |