We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fda761 commit 2faddedCopy full SHA for 2fadded
seleniumbase/fixtures/js_utils.py
@@ -217,7 +217,7 @@ def is_in_frame(driver):
217
Returns True if the driver has switched to a frame.
218
Returns False if the driver was on default content.
219
"""
220
- return driver.execute_script(
+ in_basic_frame = driver.execute_script(
221
222
var frame = window.frameElement;
223
if (frame) {
@@ -228,6 +228,13 @@ def is_in_frame(driver):
228
}
229
230
)
231
+ location_href = driver.execute_script("""return window.location.href;""")
232
+ in_external_frame = False
233
+ if driver.current_url != location_href:
234
+ in_external_frame = True
235
+ if in_basic_frame or in_external_frame:
236
+ return True
237
+ return False
238
239
240
def safe_execute_script(driver, script):
0 commit comments