Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:20:19+00:00 2026-06-12T01:20:19+00:00

One of my Selenium tests issues a click on a button to create a

  • 0

One of my Selenium tests issues a click on a button to create a new user:

seleniumDriver.findElement(By.xpath("//input[@value='Save']")).click();

However, the validation fails (it is meant to fail!) so that a <div> is displayed to inform the user to correct some input fields. This works very well manually, but the automated test aborts with the following error message:

com.thoughtworks.selenium.SeleniumException: Timed out waiting for action to finish
    at org.openqa.selenium.internal.seleniumemulation.Timer.run(Timer.java:44)
    at org.openqa.selenium.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:145)
    at org.openqa.selenium.WebDriverCommandProcessor.doCommand(WebDriverCommandProcessor.java:75)
    at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:193)
    at com.holcim.logon.admin.web.admin.UserTest.createUser(UserTest.java:354

How is it possible that a click() ends up in a timeout? And how could I possible fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:20:20+00:00Added an answer on June 12, 2026 at 1:20 am

    possible solution to your problem:
    1) instead of xPath find css selector of the needed element.
    it gonna be something like:

    String cssSelector = "input[value='Save']";
    

    but before you gonna use it verify in firepath, firebug addon in ffox that needed element is located properly.

    firepath verify

    After we obtained needed css selector, we can use approach that always works. using js function that
    will perform a click on the needed element.

    public void jsClick(String cssSelector){
    JavascriptExecutor js = (JavascriptExecutor) driver;
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("var x = $(\'"+cssSelector+"\');");
            stringBuilder.append("x.click();");
            js.executeScript(stringBuilder.toString());
    }
    

    Hope this works for you now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with Selenium in order to create load balancing tests on a
I'm writing some selenium tests (in rspec for a rails app). One of my
I am doing some tests using selenium on a website. One of the main
When creating selenium tests using the #{selenium} tag, how do you use complex XPath
Is it possible to create Selenium tests using the Firefox plugin that use randomly
I am working on Selenium tests for one of our pages that has an
I've been running selenium tests against a site and on one of the main
So, I've started to create some Ruby unit tests that use Selenium RC to
This is my Selenium browser test class (a derived one, but should not be
With selenium can one run a test which check all images on a current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.