Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I click on DONE button?

Eclipse/Java with selenium; I"d want to click on DONE buttonenter image description here

I have tried this driver.findElement(By.cssSelector("button[aria-label='Done. Search for round trip flights, departing on March 15, 2025 and returning on April 15, 2025']")).click();

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I used a more generic version of a CSS selector,

button[aria-label^='Done.']

With a WebDriverWait, the full code would be

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("button[aria-label^='Done.']"))).click();
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading