htmlunit-driver icon indicating copy to clipboard operation
htmlunit-driver copied to clipboard

HtmlUnit: Find driver by classname doesnt work with HtmlUnit but works with Chrome

Open danielkp1234 opened this issue 5 years ago • 1 comments

So i am having another problem trying to click a button with htmlunit driver it works with the chrome driver here is the code i am trying to use ` driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.get("https://frostruphave.viggo.dk/Basic/Account/Login");

System.out.println(driver.getPageSource());

WebDriverWait wait = new WebDriverWait(driver, 8);

wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("unic")));

driver.findElement(By.className("unic")).click();`

The line that causes the problem is wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("unic")));

Here is the Stacktrace: https://pastebin.com/5hd4593C

It has been tested working with the ChromeDriver message me if you need more info :) @rbri

danielkp1234 avatar Aug 13 '20 12:08 danielkp1234

have done some analysis on this - the page uses the quill editor, therefore i added a small test for quill (org.htmlunit.libraries.QuillTest). But this test fails because of the missing 'class' support in Rhino.

I guess this is the reason for this page to fail. Maybe we will have this in the future.

rbri avatar Jan 13 '25 09:01 rbri