Wednesday, 7 August 2013

How to check the link is enabled in Webdriver using java?

How to check the link is enabled in Webdriver using java?

I have searched the forums before posting this issue here. I have found
some answers but i am not able to get the success from the answers in
that. My issue is
How to check the link is enabled in Webdriver using java. Please find the
attached screen shots for the same.


I have written the code for this:
WebElement textlink =
driver.findElement(By.id(OR.getProperty("lnkView_ID")));
if (textlink.isEnabled())
System.out.println("View link: Enabled");
else
System.out.println("View link: Disabled");
Please help me out with this issue. Help will be appreciated.

No comments:

Post a Comment