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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:30:18+00:00 2026-06-14T01:30:18+00:00

I’m running approx 30 scripted test cases (each test case is a script) in

  • 0

I’m running approx 30 scripted test cases (each test case is a script) in series and there are often failures that include: cannot identify specified element, element not present.

I’ve already added a lot of different methods to wait for an element to show up. Sometimes when it is clearly there, I guess Selenium has a hard time trying to find the element’s id ?

I’ve included several

do{
    if(selenium.isElementPresent("id=resultTable_0_0"){
    selenium.click("viewResultForm:refresh_button");
    }
}while (!selenium.isElementPresent("id=resultTable_0_0"));

and

if(selenium.isElementPresent("id=resultTable_0_0"))
        selenium.isVisible("id=resultTable_0_0");

and

if(selenium.isElementPresent("id=resultTable_0_0_1_to"))
    selenium.click("resultTable_0_0_1_to");

always checking if an element is even present before doing something. This probably has a huge impact on performance, but for now I just want my scripts to run error-free, completely robust. I have this piece of code:

do{
    if(selenium.isElementPresent("id=resultTable_0_0")){
    selenium.click("viewResultForm:refresh_button");
    }
}while (!selenium.isElementPresent("id=resultTable_0_0"));

        if(selenium.isElementPresent("id=resultTable_0_0"))
            selenium.isVisible("id=resultTable_0_0");
        if(selenium.isElementPresent("id=viewResultForm:currentDetailViewType"))
            selenium.isVisible("id=viewResultForm:currentDetailViewType");
        if(selenium.isElementPresent("id=viewResultForm:currentSearchDateType"))
            selenium.isVisible("id=viewResultForm:currentSearchDateType");
        if(selenium.isElementPresent("id=viewResultForm:currentLegalEntity"))
            selenium.isVisible("id=viewResultForm:currentLegalEntity");
        if(selenium.isElementPresent("id=viewResultForm:currentRollupBy"))
            selenium.isVisible("id=viewResultForm:currentRollupBy");
        if(selenium.isElementPresent("id=viewResultForm:currentSecurityAltId"))
            selenium.isVisible("id=viewResultForm:currentSecurityAltId");
        if(selenium.isElementPresent("id=viewResultForm:currentSecurityAltIdType"))
            selenium.isVisible("id=viewResultForm:currentSecurityAltIdType");
        if(selenium.isElementPresent("id=viewResultForm:currentDepoViewType"))
            selenium.isVisible("id=viewResultForm:currentDepoViewType");
        if(selenium.isElementPresent("id=viewResultForm:currentBusinessDate"))
            selenium.isVisible("id=viewResultForm:currentBusinessDate");

        System.out.println("Success T13001");
        selenium.stop(); 

Even this will error out !!! and it wont fall through to reach selenium.stop and ‘fake’ a success. What can I do to build on the robustness of my scripts? Any help would be appreciated.

I’m using Selenium 2.20.0 on IE 8.

  • 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-14T01:30:19+00:00Added an answer on June 14, 2026 at 1:30 am

    As per your question if its the problem of not finding the id of locators then try using other locators like css and xpath.

    Apply selenium.waitforpagetoload when ever you move to a new page or you open a url.

    If you are working on an ajax based application then selenium.waitforcondition would be gud to you.

    Whereever you think that a locator may take some time to appear after some operation,Use proper waits for those elements.

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

Sidebar

Related Questions

I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I have an autohotkey script which looks up a word in a bilingual dictionary

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.