title: Python selenium xpath geting text is empty
body: <p>So I have this <a href="https://www.imobiliare.ro/inchirieri-apartamente/sibiu/hipodrom-4/apartament-de-inchiriat-3-camere-X84T100B2?lista=2361394" rel="nofollow noreferrer">link</a> and I'm trying to obtain the text from this  XPath <code>//div[@class='titlu']</code> but for some reason sometimes I'm getting the text how it should be and other times I'm receiving an empty string even though the site is containing that text. </p>
  
  <p><strong>What have I tried:</strong></p>
  
  <pre><code>wait = WebDriverWait(self.driver, 10)   
  wait.until(EC.presence_of_element_located((By.PARTIAL_LINK_TEXT, "Ap. de lux 3 ")))
  e = self.driver.find_element_by_xpath(html_data.xpath)
  </code></pre>
  
  <p>also: </p>
  
  <pre><code>wait = WebDriverWait(self.driver, 10)
  wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
  e = self.driver.find_element_by_xpath(xpath)
  </code></pre>
  
  <p>and also I've used and this type of wait:</p>
  
  <pre><code>self.driver.implicitly_wait(10)
  </code></pre>
  
  <p><strong>How I'm getting the text at this moment:</strong></p>
  
  <pre><code>self.driver.find_element_by_xpath(xpath).text
  </code></pre>
  
  <p>the problem that I've faced here is that the text is refusing to appear on some occasions and in others it does, even though the actually XPath is found and it exists already. Maybe is not loaded completely, can any of you give me some advice about how can I fix this? </p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Also, I'm trying to get the location and size of that using selenium but both of them are going to be 0. Any idea how can I fix that?</p>
  
  <p><code>with, height = self.driver.find_element_by_xpath(html_data.xpath).size
   x, y = self.driver.find_element_by_xpath(html_data.xpath).location</code></p>