xpath « HTMLUnit « Java Testing Q&A

Home
Java Testing Q&A
1.Development
2.FindBugs
3.HTMLUnit
4.hudson
5.junit
6.performance
7.plugin
8.profile
9.selenium
10.Tools
11.unit test
Java Testing Q&A » HTMLUnit » xpath 

1. Does this xpath look correct?    stackoverflow.com

page.getByXPath("//*[@href='http://www.example.com/index.do/abc/1_*'");
Do I need to escape any characters? I am trying to get all ahref links on the page that have the pattern of:
http://www.example.com/index.do/abc/1_
so these should all be retrieved:
http://www.example.com/index.do/abc/1_asdf-asdfasdf
http://www.example.com/index.do/abc/1_223
http://www.example.com/index.do/abc/1_as.php
http://www.example.com/index.do/abc/1_2222233

2. Is HtmlUnit 2.8 getFirstByXPath different from HtmlUnit 1.14 getFirstByXPath?    stackoverflow.com

I have a site structure that looks something like this:

<div class='main_container'>
     <div class='item_container'>
         <div class='body'>
     ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.