title: Finding an element within an element using Selenium Webdriver
body: <p>I am scraping a website that has a list of football games generated using JavaScript. I have written the following line that creates a list of all the game elements on the page:</p>
  
  <pre><code>list = browser.find_elements_by_xpath('//*[@data-sportid="1"]')
  </code></pre>
  
  <p>If I then write</p>
  
  <pre><code>for game in list:
      print game.text
  </code></pre>
  
  <p>it prints all the text fields contained in each of the games (home team name, away team name, etc.)</p>
  
  <p>However, the loop</p>
  
  <pre><code>for game in list:
      print game.find_element_by_xpath('//*[@class="home-team"]').text
  </code></pre>
  
  <p>prints the very first home team's name in the page for each iteration of the loop.</p>
  
  <p>It appears that <code>game.find_element_by_xpath</code> is searching the entire page, and not just this <code>game</code> element, and so it keeps returning the first home team name on the page.</p>
  
  <p>How can I search for a child element within each item of the list?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><a href="https://www.betfair.com/exchange/football/coupon?id=2" rel="noreferrer">Here is the exact page I am working on</a></p>