Hi Thomas,
> Is it a bug or a feature that HtmlUnitDriveris stricter then the visual drivers?
HtmlUnit should follow real browsers along the way.
Please submit a minimal test case to HtmlUnit bug tracker.
Thanks,
Ahmed
On May 7, 11:42 am, Thomas Sundberg <
thomas.k.sundb...@gmail.com>
wrote:
> Hi!
>
> The error below was due to a faulty html.
>
> The part that failed was:
>
> <input id="searchButton"
> type="submit"
> disabled="false"
> tabindex="3"
> value="Sök"/>
>
> A version that work is:
>
> <input id="searchButton"
> type="submit"
> tabindex="3"
> value="Sök"/>
>
> The failing html worked ok visual driver, i.e. Firefox and Internet
> Explorer. TheHtmlUnitDriverwas a bit more picky and failed when, a
> faulty(?), property disabled was set as above.
>
> I'm not sure.
>
> /Thomas
>
> On Mon, May 3, 2010 at 14:10, Thomas Sundberg
>
>
>
> <
thomas.k.sundb...@gmail.com> wrote:
> > On Mon, May 3, 2010 at 13:44, Mark Collin <
m...@ardescosolutions.com> wrote:
> >> > org.openqa.selenium.WebDriverException: Cannot locate element used to submit
> >> >form
>
> >> Means it cannot find the submit button for theformyou are trying to
> >> submit. You can specify the exact button and use the .click() command
> >> instead so something like:
>
> >> driver.findElement(By.id("<idOfSubmitButton>")).click();
>
> > Didn't work either. I had tried it earlier, but didn't include it in
> > my original post.
>
> >> Bear in mind that HTMLUnit is not using the same JavaScript rendering engine
> >> as FireFox so the way it constructs the DOM may be different which is
> >> probably what is causing you issues.
>
> > Could this be an issue even if my web page isn't using any Javascript?
>
> > /Thomas
>
> >> Regards
>
> >> Mark
>
> >> -----Original Message-----
> >> From:
seleniu...@googlegroups.com
> >> [mailto:
seleniu...@googlegroups.com] On Behalf Of Thomas Sundberg
> >> Sent: 03 May 2010 09:26
> >> To: Selenium Users
> >> Subject: [selenium-users] [WebDriver]Submittingaformwith
> >>HtmlUnitDriver()fails
>
> >> Hi!
>
> >> I'm trying to implement continuous integration with WebDriver. The
> >> code below works:
>
> >> WebDriver driver = new FirefoxDriver();
> >> driver.get(url);
>
> >> WebElementform= driver.findElement(By.id("revocationIds"));
>
> >> form.submit();
>
> >> Changing to
>
> >> WebDriver driver = newHtmlUnitDriver();
> >> driver.get(url);
>
> >> WebElementform= driver.findElement(By.id("revocationIds"));
>
> >> form.submit();
>
> >>failswith the excpetion:
> >> If you have received this email in error please notify
postmas...@ardescosolutions.com
> >> For more options, visit this group athttp://
groups.google.com/group/selenium-users?hl=en.