title: how do i access nested html elements using selenium?
body: <p>i am using a  school class schedule  website and i want to access the div element  that contains info on how many seats are in a class and who is teaching it in order to scrape it.  i first find the element which contains the  div element i want, after that i try to find the div element i want by using xpaths. the  problem i face is  when i try to use  either the find_element_by_xpath or find_elements_by_xpath to get the div i want  i get this error:</p>
  
  <pre><code>'list' object has no attribute 'find_element_by_xpath'
  </code></pre>
  
  <p>is this error happening because the div element i want to find is nested? is there a way to get nested elements using a div tag?</p>
  
  <p>here is the code i have currently :</p>
  
  <pre><code>
  driver = webdriver.Chrome(ChromeDriverManager().install())
  url = "https://app.testudo.umd.edu/soc/202008/INST"
  driver.get(url)
  section_container = driver.find_elements_by_id('INST366')
  
  sixteen_grid = section_container.find_element_by_xpath(".//div[@class = 'sections sixteen colgrid']").text 
  
  
  
  </code></pre>
  
  <p>the info i want is this:</p>
  
  <pre><code>
  &lt;div class = "sections sixteen colgrid"&lt;/div&gt;
  </code></pre>
  
  <p>its currently inside this id tag:</p>
  
  <pre><code>&lt;div id="INST366" class="course"&lt;/div&gt;
  </code></pre>
  
  <p>greatly appreciated if anyone could help me out with this</p>