[py] Correct frame switching expected condition

During PRs a conflict didn't get landed properly. This should fix it.

Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/SeleniumHQ/selenium
Cr-Mirrored-Commit: 8d9ea942c3d1ca576747ec110f091ffdef481a6b
diff --git a/selenium/webdriver/support/expected_conditions.py b/selenium/webdriver/support/expected_conditions.py
index 90182ef..b886b89 100644
--- a/selenium/webdriver/support/expected_conditions.py
+++ b/selenium/webdriver/support/expected_conditions.py
@@ -22,6 +22,7 @@
 from selenium.common.exceptions import StaleElementReferenceException
 from selenium.common.exceptions import WebDriverException
 from selenium.common.exceptions import NoAlertPresentException
+from selenium.webdriver.common.by import By
 from selenium.webdriver.remote.webdriver import WebElement
 
 """
@@ -219,11 +220,10 @@
     """
     def _predicate(driver):
         try:
-            if hasattr(self.frame_locator, '__iter__'):
-                driver.switch_to.frame(_find_element(driver,
-                                                     self.frame_locator))
+            if hasattr(locator, '__iter__'):
+                driver.switch_to.frame(driver.find_element(locator))
             else:
-                driver.switch_to.frame(locator)
+                driver.switch_to.frame(driver.find_element(By.NAME, locator))
             return True
         except NoSuchFrameException:
             return False