title: Selenium wait for element to be clickable python
body: <p>All, I'm needing a little assistance with Selenium waits. I can't seem to figure out how to wait for an element to be ready.</p>
  
  <p>The element that I am needing to wait I can locate and click using my script via the code below...</p>
  
  <pre><code>CreateJob = driver.find_element_by_xpath(".//*[@id='line']/div[1]/a")
  </code></pre>
  
  <p>or </p>
  
  <pre><code>CreateJob = driver.find_element_by_partial_link_text("Create Activity")
  </code></pre>
  
  <p>I'm needing to wait for this element to be on the page and clickable before I try to click on the element. </p>
  
  <p>I can use the <code>sleep</code> command, but I have to wait for 5 seconds or more and it seems to be unreliable and errors out 1 out of 8 times or so. </p>
  
  <p>I can't seem to find the correct syntax to use. </p>
  
  <p>the HTML code for this is below.</p>
  
  <pre><code>&lt;document&gt;
  &lt;html manifest="https://tddf/index.php?m=manifest&amp;a=index"&gt;
  &lt;head&gt;
  &lt;body class="my-own-class mozilla mozilla48 mq1280 lt1440 lt1680 lt1920 themered" touch-device="not"&gt;
  &lt;noscript style="text-align: center; display: block;"&gt;Please enable JavaScript in your browser settings.&lt;/noscript&gt;
  &lt;div id="wait" style="display: none;"&gt;
  &lt;div id="processing" class="hidden" style="display: none;"/&gt;
  &lt;div id="loading" class="hidden" style="display: none;"/&gt;
  &lt;div id="loadingPartsCatalog" class="hidden"/&gt;
  &lt;div id="panel"&gt;
  &lt;div id="top-toolbar" class="hidden" style="display: block;"&gt;
  &lt;div id="commands-line" class="hidden" style="display: block;"&gt;
  &lt;div id="line"&gt;
  &lt;div class="action-link"&gt;
  &lt;a class="tap-active" href="#m=activity/a=set" action_link_label="create_activity" component_gui="action" component_type="action"&gt;Create Activity&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="action-link"&gt;
  &lt;div class="action-link"&gt;
  &lt;div class="action-link"&gt;
  &lt;/div&gt;
  &lt;div id="commands-more" style="display: none;"&gt;
  &lt;div id="commands-list" class="hidden"&gt;
  &lt;/div&gt;
  &lt;div id="provider-search-bar" class="hidden center"  
  </code></pre>