HtmlUnitDriver exception

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

HtmlUnitDriver exception

Manoj
Hello,
   I have a script that works perfectly on FireFoxDriver but while exxecuting the same using the HtmlUnitDriver it shows throws an error "ElementNotFound Exception".

I Searched in Google but cant find any solution, but seems to be a issue of htmlunitdriver.

Is that so ?

Can any one help me on this regard ?


- Manoj
Reply | Threaded
Open this post in threaded view
|

Re: HtmlUnitDriver exception

softwaretestingforum
Administrator
can you print html source of steps and see where script goes when you encounter this error?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: HtmlUnitDriver exception

Manoj
Tarun,
    Right now I dont have access to that. I am on a different work station now.

It says that an particular element is not found for e.g - Login id. But this problem does not occur while running in the FireFoxDriver and happens only with the HtmlUnitDriver.

I checked in terms of Xpath and everything is fine.

-Manoj

Reply | Threaded
Open this post in threaded view
|

Re: HtmlUnitDriver exception

zlos7ar
maybe you should try finding the element by id or by name
Reply | Threaded
Open this post in threaded view
|

Re: HtmlUnitDriver exception

softwaretestingforum
Administrator
In reply to this post by Manoj
when you have access to the machine try -

driver.getHTMLSource()

before the statement you encounter the error. You would know where you control is when you see this error.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: HtmlUnitDriver exception

Manoj
Alright, I will try that.

Thanks.