title: Selenium - get all iframes in a page (even nested ones)?
body: <p>I am trying to search through all the html of websites that I reach using selenium webdriver.  In selenium,  when I have an iframe, I must switch to the iframe and then switch back to the main html to search for other iframes.  </p>
  
  <p>However, with nested iframes, this can be quite complicated.  I must switch to an iframe, search it for iframes, then switch to one iframe found, search IT for iframes, then to go to another iframe I must switch to the main frame, then have my path saved to switch back to where I was before, etc.  </p>
  
  <p>Unfortunately, many pages I've found have iframes within iframes within iframes (and so on).  </p>
  
  <p>Is there a simple algorithm for this?  Or a better way of doing it?</p>