title: How do I select a changed button in this case on selenium
body: <p>I am trying to wait for &quot;Agree&amp;Continue&quot; button to showup and interact with .click()</p>
  <p>The button basically starts off with a &quot;continue button&quot;, then it changed to &quot;Agree and continue&quot;.</p>
  <p>Before &quot;continue&quot; button:</p>
  <pre><code>&lt;button class=&quot;ppvx_btn___5-8-2&quot; aria-live=&quot;assertive&quot; id=&quot;payment-submit-btn&quot; data-testid=&quot;submit-button-initial&quot; data-disabled=&quot;true&quot; xpath=&quot;1&quot;&gt;Continue&lt;span class=&quot;ppvx_btn--state__screenreader___5-8-2&quot;&gt;&lt;/span&gt;&lt;/button&gt;
  </code></pre>
  <p>After &quot;Agree and continue&quot; button:</p>
  <pre><code>&lt;button class=&quot;ppvx_btn___5-8-2&quot; aria-live=&quot;assertive&quot; id=&quot;payment-submit-btn&quot; data-testid=&quot;submit-button-initial&quot; data-disabled=&quot;false&quot; xpath=&quot;1&quot;&gt;Agree &amp;amp; Continue&lt;span class=&quot;ppvx_btn--state__screenreader___5-8-2&quot;&gt;&lt;/span&gt;&lt;/button&gt;
  </code></pre>
  <p>What I've tried:</p>
  <pre><code>mainagree = WebDriverWait(driver, 20).until(
  EC.presence_of_element_located((By.XPATH, &quot;//button[@id='payment-submit-btn'][@data- 
  disabled='false']&quot;)).click()
  print('clicked')
  </code></pre>
  <p>It works some times, but it's not consistent.</p>
  <p>Sometimes, I think it clicked the previous button that's &quot;continue&quot; button and when it doesn't work, I got this error message:</p>
  <pre><code>selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (951, 965)
  </code></pre>
  <p>(Session info: chrome=91.0.4472.27)</p>