WebElement elem1=driver.findElement(By.linkText("link1");
if(elem1.isEnabled()) {
click it
}
else
{
don't click it
}
but instruction pointer never goes to isEnabled function if my link is
disabled .It throws an error Unable to locate element .
Can anyone please help me that how i can use isEnabled Function()
Thanks
Nitin
We can't really dig into this until we know which browser and version
you're using, on which OS, using which version of webdriver/selenium,
as well as telling us what you're trying to do. The individual drivers
do things their own way, so it's possible someone may spend a
significant amount of time tracking down the issue in the wrong driver
:)
Any chance you could let us know some more information?
Regards,
Simon
> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>
OS:Linux (Suse11.2-kernel 2.6.31)
Browser:Firefox 3.5.8
Build:selenium-server-2.0.1.jar
Use case:
I have one link on my browser which can be disabled /enabled.Before
clicking that link i want to know is that link enabled or not .What
can be best possible way to achieve this through WebDriver.
Please let me know if you want any other information .
Thanks
Nitin
On Apr 1, 4:10 am, Simon Stewart <simon.m.stew...@gmail.com> wrote:
> Hi Nitin,
>
> We can't really dig into this until we know which browser and version
> you're using, on which OS, using which version of webdriver/selenium,
> as well as telling us what you're trying to do. The individual drivers
> do things their own way, so it's possible someone may spend a
> significant amount of time tracking down the issue in the wrong driver
> :)
>
> Any chance you could let us know some more information?
>
> Regards,
>
> Simon
>
Regards,
Simon