Thanks jevon for your help
Actually the link was like
<a class="xxx">abcdef</a>
So I used
IElement e = null;
e = getElementByXPath("//a[contains(string(),\"xxx\")]");
if (e.getAttribute("href") == null) {
logger.info("LINK disabled " + LINK_MODIFY);
} else {
logger.info("LINK not disabled " + LINK_MODIFY);
}
And its working.
Thanks,
Rajinder
________________________________
From: Jevon Wright [mailto:[email protected]]
Sent: Wednesday, April 01, 2009 6:40 AM
To: JWebUnit Development mail list
Subject: Re: [JWebUnit-development] JwebUnit Testing
Hi,
Do you mean something like <a href="">disabled</a>?
If the element has an ID, e.g. <a href=""
id="disabled_link">disabled</a>, you could test it directly using the
new IElement interface:
IElement a = getElementById("disabled_link");
assertEquals("", a.getAttribute("href"));
Hope this helps,
Jevon
On Tue, Mar 31, 2009 at 11:05 PM, Singh-2, Rajinder
<[email protected]> wrote:
I have some href links on page which are disabled that is they don't
point to any url.
Is there any way in JWebUnit through which I can check whether the link
is enabled or disabled.
Please help.
Regards
Rajinder
________________________________
From: Singh-2, Rajinder
Sent: Thursday, March 05, 2009 12:55 PM
To: 'Julien HENRY'
Subject: Help:JwebUnit Testing
Hi Julien,
I have a group of checkbox on my page with same name but different
values.
I want to click one with particular value
When I use assertCheckboxPresent ("prescription_id", serialNumber);
method it works fine
But while checking the checkbox using
checkCheckbox ("prescription_id", serialNumber);
It does not find it.
Please let me know what the solution for this problem is.
Regards,
Rajinder Singh
------------------------------------------------------------------------
------
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development
------------------------------------------------------------------------------
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development