Skip to content

Commit 92fe34e

Browse files
committed
Only scroll to iframes before switching to them if identifier is a string
1 parent 04e71ca commit 92fe34e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ def switch_to_frame(self, frame, timeout=None):
16871687
timeout = settings.SMALL_TIMEOUT
16881688
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
16891689
timeout = self.__get_new_timeout(timeout)
1690-
if self.is_element_visible(frame):
1690+
if type(frame) is str and self.is_element_visible(frame):
16911691
try:
16921692
self.scroll_to(frame, timeout=1)
16931693
except Exception:

0 commit comments

Comments
 (0)