Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
Unable to click buttons with HtmlUnitDriver but able to click buttons with FirefoxDriver

I have a code using Selinium HtmlUnitDrive. I'm able to access the website and click the except cookies but I can't seem to click the play demo button. I don't what is a problem because I can click all buttons using FirefoxDriver.

Before I could not access any elements using HtmlUnitDriver until I used WebDriver driver = new HtmlUnitDriver(BrowserVersion.FIREFOX, true);

Can someone assist because I'm looking to use HtmlUnitDriver.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Possibly it's a typo as there are no blank spaces between Pl and ay. Effectively, you code block would be:

//CLICK DEMO BUTTON
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//button[text()='Play Demo ']"))).click();
System.out.println("DEMO BUTTON CLICKED");

Accomodating the blank space, you can use:

wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//button[normalize-space()='Play Demo']"))).click();
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!