title: Python: find_element() takes from 1 to 3 positional arguments but 6 were given
body: <p>I have the following code to download a web page in Python using Selenium and Firefox. A part of the page is rendered with Javascript, so I want to wait until a phrase is rendered.</p>
  <p>This is the code I am using:</p>
  <pre class="lang-py prettyprint-override"><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  from selenium.common.exceptions import TimeoutException
  
  def firefoxget(url: str, file: str):
      browser = webdriver.Firefox()
      browser.get(url)
      
      WebDriverWait(browser,30).until(EC.text_to_be_present_in_element(By.XPATH,&quot;//*[contains(text(),'In Stock')]&quot;))
  
      f = open(file, &quot;w&quot;)
      f.write(browser.page_source)
      f.close()
  
      browser.close()
  </code></pre>
  <p>The problem is I get &quot;find_element() takes from 1 to 3 positional arguments but 6 were given&quot; at the <code>WebDriverWait</code> line. I am new to python, and unfortunately, it does not make sense to me since I cannot understand where 6 arguments come from.</p>