title: QuerySelector for Web Elements Inside iframe
body: <p>Edit: New title.
  What I'm looking for is a document.querySelector for elements inside an iframe.</p>
  
  <p>I've done quite a bit of Googling for an answer and finally I'm stumped.</p>
  
  <p>I'm trying to query inside an iframe. I'm building string selectors to be used in Selenium and usually I just inspect the element with Firebug, and use document.querySelectorAll("theStringIBuid");</p>
  
  <p>But it doesn't work with elements inside iframes. I've tried all of the below to get an element "radiobutton1" inside the "page-iframe" iframe.</p>
  
  <pre><code>var elem1 = ".page-iframe";
  console.log(elem1);
  var elem2 = ".radiobutton1";
  console.log(elem2);
  document.querySelectorAll(elem1+elem2+"");
  
  document.querySelectorAll('.page-iframe').contentWindow.document.body.querySelectorAll('.radiobutton1')
  document.getElementById('.page-iframe').contentWindow.document.body.innerHTML;
  
  [].forEach.call( document.querySelectorAll('.page-iframe'), 
  function  fn(elem){ 
  console.log(elem.contentWindow.document.body.querySelectorAll('.radiobutton1')); });
  
  var contentWindow = document.getElementById('.page-iframe').contentWindow 
  var contentWindow = document.querySelectorAll('.page-iframe') 
  var contentWindow = document.querySelectorAll('.page-iframe')[0].contentWindow
  </code></pre>
  
  <p>Thanks-</p>