SeleniumHQ / SeleniumHQ/htmlunit-driver
HtmlUnit: Find driver by classname doesnt work with HtmlUnit but works with Chrome
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 266
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure at the login URL using HtmlUnitDriver and the shown By.className("unic") lookup inside ExpectedConditions.visibilityOfElementLocated; compare the result with ChromeDriver and inspect the linked stack trace. Done means the class-name lookup and visibility wait behave consistently, or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100