title: python selenium "Explicit Waits" for frame
body: <p>In the same page same step, if use "wait" will get error message
  "NoSuchElementException: Message: Unable to find element with name == rw"</p>
  
  <p>if use "switch_to_frame" will success switch the frame..</p>
  
  <p>why have the different?</p>
  
  <p>1)</p>
  
  <pre><code>wait = WebDriverWait(driver, 300)
  wait.until(EC.frame_to_be_available_and_switch_to_it(driver.find_element_by_name('rw')))
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>driver.switch_to_frame('rw')
  </code></pre>
  
  <p>3)</p>
  
  <pre><code>class cm(unittest.TestCase):
      def setUp(self):
          self.driver = webdriver.Ie()
          self.driver.implicitly_wait(30)
          self.base_url = "http://mytestweb.com"
  
  
      def testcm(self):
          driver = self.driver
          driver.maximize_window()
          self.driver.get(self.base_url)
          wait = WebDriverWait(driver, 30)
          self.main_wh = driver.window_handles
  ##        wait.until(EC.invisibility_of_element_located((By.ID,'Frame2')))
          wait.until(EC.frame_to_be_available_and_switch_to_it((By.NAME,'rw')))
  ##        driver.switch_to_frame('rw')
  </code></pre>
  
  <p>if i tried use 3) will get timeout message</p>