title: Colorbox Iframe name keeps changing so I cannot selectFrame with Selenium
body: <p>I'm trying to automate a simple page that has a colorbox that loads an iFrame inside.  Whenever I record a test in Selenium it captures the iframe just fine.  But then when I re-run the test it cannot grab the iframe inside.  I looked into it and you'll see this code:</p>
  
  <p>Command: selectFrame
  Target: iframe_1313186641607
  Value: (blank)</p>
  
  <p>I go to Firefox and inspect element and I see:</p>
  
  <pre><code>&lt;div&gt;
  &lt;div id="cboxMiddleLeft" style="float: left; height: 558px;"&gt;&lt;/div&gt;
  &lt;div id="cboxContent" style="float: left; width: 698px; height: 558px;"&gt;
  &lt;div id="cboxLoadedContent" style="display: block; width: 698px; overflow: auto; height: 530px;"&gt;
  &lt;iframe id="cboxIframe" frameborder="0" src="SelectCourseOptions.aspx?courseno=111&amp;subject=ACC&amp;term=Fall 2010" name="iframe_1313186641607"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;body style="background-color: White"&gt;
  &lt;form id="form1" action="SelectCourseOptions.aspx?courseno=111&amp;subject=ACC&amp;term=Fall+2010" method="post" name="form1"&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>So you can see it's matching on the "name" of the iframe.  Then, I'll go re-run the test and it can't select the iframe, I'll inspect element again and see this:</p>
  
  <pre><code>&lt;div&gt;
  &lt;div id="cboxMiddleLeft" style="float: left; height: 558px;"&gt;&lt;/div&gt;
  &lt;div id="cboxContent" style="float: left; width: 698px; height: 558px;"&gt;
  &lt;div id="cboxLoadedContent" style="display: block; width: 698px; overflow: auto; height: 530px;"&gt;
  &lt;iframe id="cboxIframe" frameborder="0" src="SelectCourseOptions.aspx?courseno=111&amp;subject=ACC&amp;term=Fall 2010" name="iframe_1313186725931"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;body style="background-color: White"&gt;
  &lt;form id="form1" action="SelectCourseOptions.aspx?courseno=111&amp;subject=ACC&amp;term=Fall+2010" method="post" name="form1"&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>Now you can see that the iframe name:</p>
  
  <p>name="iframe_1313186725931"</p>
  
  <p>That is different from the first time when I recorded the test:</p>
  
  <p>name="iframe_1313186641607"</p>
  
  <p>Just for fun I closed the colorbox and re-opened and the name changed again.  How can I work around this?  It seems colorbox just generates a dynamic name every time so I can't select it in Selenium?</p>
  
  <p>Thanks for your help.</p>