commit | 3fd7066f3b9525472ea17f552931f78fba837c7a | [log] [tgz] |
---|---|---|
author | JerryJia <jerryjiahaha@gmail.com> | Sat Apr 04 05:00:25 2020 +0800 |
committer | GitHub <noreply@github.com> | Fri Apr 03 22:00:25 2020 +0100 |
tree | 33a1e6527c866783b3d6d93beb90ac8c7591192c | |
parent | 6ee39c4b8eec2396fc771d2ba76273bd1b1fda4d [diff] |
Check if argument is iterable. E.g. type **list** also works. (#7037) Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk> Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/SeleniumHQ/selenium Cr-Mirrored-Commit: 32fa113844fb323e16472de14ffdee9f8f44d468
diff --git a/selenium/webdriver/support/expected_conditions.py b/selenium/webdriver/support/expected_conditions.py index c7bbff8..afdb9f7 100644 --- a/selenium/webdriver/support/expected_conditions.py +++ b/selenium/webdriver/support/expected_conditions.py
@@ -245,7 +245,7 @@ def __call__(self, driver): try: - if isinstance(self.frame_locator, tuple): + if hasattr(self.frame_locator, '__iter__'): driver.switch_to.frame(_find_element(driver, self.frame_locator)) else: