Skip to content

Commit

Permalink
Check if argument is iterable. E.g. type **list** also works. (#7037)
Browse files Browse the repository at this point in the history
Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk>
  • Loading branch information
jerryjiahaha and AutomatedTester committed Apr 3, 2020
1 parent b4b361c commit 32fa113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/support/expected_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def __init__(self, locator):

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:
Expand Down

0 comments on commit 32fa113

Please sign in to comment.