Hi,
Sounds like the XPath is not correct. You could check with
getElementByXPath() which will throw additional exception information if
necessary. Special characters such as & may need to be escaped.
Since you are checking for a URL, the URL may often change so this may not
be the best approach. It may be best to search for <a> by ID.
Jevon
On Wed, Mar 10, 2010 at 5:27 AM, lakshmi somavaram <lsomava...@gmail.com>wrote:
> Dear Users,
>
> I have trouble using assertElementByXPath for the following link. JWebUnit
> says unable to find element.
>
> Please let me know how to handle the special characters in XPath.
>
> *HTML code:*
> **
> <a href="
> http://www.company.com/wps/portal/!ut/p/_s.7_0_A/7_0_1OB?navtype=FT&navid=FOIA<http://www.company.com/wps/portal/%21ut/p/_s.7_0_A/7_0_1OB?navtype=FT&navid=FOIA>
> ">FOIA</a>
>
> *Jwebunit code:*
>
> assertElementPresentByXPath("//a...@href*='
> http://www.company.com/wps/portal/!ut/p/_s.7_0_A/7_0_1OB?navtype=FT&navid=FOIA'<http://www.company.com/wps/portal/%21ut/p/_s.7_0_A/7_0_1OB?navtype=FT&navid=FOIA%27>
> ]");
>
> Thank you,
>
> Lakshmi
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> JWebUnit-users mailing list
> JWebUnit-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users