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

  • Home
  • SEARCH
  • 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 9209691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:54:17+00:00 2026-06-18T00:54:17+00:00

I am using Selenium 2.25 WebDriver I’m having a issue with finding the elements

  • 0

I am using Selenium 2.25 WebDriver

I’m having a issue with finding the elements on the page and some times my test cases able to find element and sometime the page is does not load and its due to page load and if i add this below line and it seems like working:

 driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(2));

my question is, i dont want to have my code scatter with the above line of code, is there a way to make it centerlize in one place?

Any help would be greatly appreciated, thanks!

  • 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-18T00:54:18+00:00Added an answer on June 18, 2026 at 12:54 am

    If you set the timeout once, it’s set for the lifetime of the driver instance. You don’t need to keep resetting it. You can set this immediately after creating the driver.

    IWebDriver driver = new FirefoxDriver();
    driver.Manage().Timeouts.SetPageLoadTimeout(TimeSpan.FromSeconds(2));
    

    The only caveat for using this timeout is that not every browser may support it completely (IE does for sure, Firefox does too I think, but I don’t think Chrome does).

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

Sidebar

Related Questions

I am using Selenium WebDriver and run into an issue. In the UI, elements
I am trying to automate my test cases using selenium webdriver in java. It
How do I configure Selenium WebDriver? I have automated test cases using Selenium with
I'm using Selenium WebDriver with Testng (started using an .xml file) to test a
I have some tests created using Selenium WebDriver. When I run them using IE
Hi I am not able to capture the screen shot using selenium webdriver .
How can we get exact time to load a page using Selenium WebDriver? We
I have a C# unit test using Selenium WebDriver to test to see if
Using Selenium WebDriver (.Net) I'm able to get to a tabstip (MS Control), and
I am writing tests using selenium webdriver with cucumber. The web page is very

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.