title: Selenium Webdriver C# - how can I remove this hard wait?
body: <p>I am having a really hard time with the following issue. I am trying to navigate through some web pages that have various inputs (text boxes/dropdowns/buttons) followed by a continue button at the bottom to move onto the next screen. My tests frequently fall over because they can't always locate the first element in order to interact with it.</p>
  
  <p>As far as I'm aware the page doesn't do any fancy AJAX post loading or anything, so once the page has loaded then Webdriver should be able to locate every element. </p>
  
  <p>My code:</p>
  
  <p>FRAMEWORK</p>
  
  <pre><code>public static void WaitOnPageForXPathClickable(string selector)
      {
          new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(20)).Until(ExpectedConditions.ElementToBeClickable((By.XPath(selector))));
      }
  </code></pre>
  
  <p>TEST CASE</p>
  
  <pre><code>Utilities.WaitOnPageForXPathClickable("the xpath of the continue button and checks that it is clickable");
  Driver.Instance.FindElement(By.XPath("the xpath of the first button that I want to click")).Click();
  </code></pre>
  
  <p>Do I need to try and include a function to ensure that the page is fully loaded before test execution? I am confused about this because I have read that Selenium already waits for the page to load by default. I would have thought that waiting for one element (the continue button) to be clickable should mean that all other elements are ready by then too? I really want to avoid having to wait for every single element before clicking it.</p>