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 8714635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:38:44+00:00 2026-06-13T05:38:44+00:00

I have a scenario where I have 29 test cases. All the test cases

  • 0

I have a scenario where I have 29 test cases. All the test cases pop-up new firefox windows and run to completion when run independently. However when I combine the test cases(all 29) into a test suite, I get random errors of “unable to locate element”. If I run the test suite multiple times, I can see different test cases fail at different places, randomly. Note- I am waiting for every elements visibility for around 100 seconds, before clicking on them. Code looks like-

    WebElement myDynamicElement = (new WebDriverWait(driver, 100))
    .until(new ExpectedCondition<WebElement>() {
    @Override
    public WebElement apply(WebDriver driver) {
    return driver.findElement(element);
    }

Could someone advice? Are smaller test suites recommended?

  • 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-13T05:38:46+00:00Added an answer on June 13, 2026 at 5:38 am

    not so far come across with a similar problem type.
    IMHO try to use a lil bit more robust wait mechanism fluentWait:

    public WebElement fluentWait(final By locator){
                Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
                        .withTimeout(30, TimeUnit.SECONDS)
                        .pollingEvery(5, TimeUnit.SECONDS)
                        .ignoring(org.openqa.selenium.NoSuchElementException.class);
                WebElement foo = wait.until(
                        new Function<WebDriver, WebElement>() {
                            public WebElement apply(WebDriver driver) {
                                return driver.findElement(locator);
                            }
                        }
                );
                return  foo;              }     ;
    

    here is documentation on fluent wait

    usage be like :

    String cssSelectorElement ="blablablab";
    String xPathElement = "balblabla";
    
    fluentWait(By.cssSelector(cssSelectorElement)).click()
    //fluentWait(By.cssSelector(cssSelectorElement)).getText();
    
    fluentWait(By.xpath(xPathElement)).click()
    //fluentWait(By.xpath(xPathElement)).getText();
    

    Don’t forget about step by step debug in IDE(IDEA, Eclipse,NetBeans) you work.

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

Sidebar

Related Questions

I am new to RSpec and I have a test scenario in which I
I have a scenario where the code under test inserts a record into a
I have a scenario where I navigate to a test site, but for whatever
Following on from this question...I'm trying to unit test the following scenario: I have
I recently upgraded a 1.3.6 application to Grails2. My test cases have started failing
I'm trying to get my head around TDD methodology and have run into -
I have the following scenario, class foo { ... private: char *_test; }; void
A few test scenarios have been recorded using CodedUI test template for my web
I have scenario where I need to host a web service (WCF) on Azure
I have scenario, I have two update panels on the page (both have update

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.