File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
# seleniumbase package
2
- __version__ = "2.3.11 "
2
+ __version__ = "2.3.12 "
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ def is_in_frame(driver):
217
217
Returns True if the driver has switched to a frame.
218
218
Returns False if the driver was on default content.
219
219
"""
220
- return driver .execute_script (
220
+ in_basic_frame = driver .execute_script (
221
221
"""
222
222
var frame = window.frameElement;
223
223
if (frame) {
@@ -228,6 +228,13 @@ def is_in_frame(driver):
228
228
}
229
229
"""
230
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
231
238
232
239
233
240
def safe_execute_script (driver , script ):
You can’t perform that action at this time.
0 commit comments