I can't figure out the syntax to return the specific elements in this HTML example.
<div class="calibre" id="calibre_link-0">
<div class="book" title="Chapter 11. Web Scraping">
<div class="titlepage">
<div class="book">
<div class="book">
<h1 class="title1"><a id="calibre_link-2915" class="firstname"></a>Web Scraping</h1>
</div>
</div>
</div>
What I have tried is driver.find_elements_by_tag_name('div.calibre.div') and also using
('div.calibre .div') | ('div.calibre + div') and other variations on those. I have managed to return all the div elements in the page but I just want to return all of the ones nested within the calibre class (i.e. book, titlepage, book, and book). Is there a way to do this?