File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -453,6 +453,17 @@ def uc_click(
453
453
driver .js_click (selector , by = by , timeout = timeout )
454
454
455
455
456
+ def uc_switch_to_frame (driver , frame ):
457
+ from selenium .webdriver .remote .webelement import WebElement
458
+ if isinstance (frame , WebElement ):
459
+ driver .reconnect (0.15 )
460
+ driver .switch_to .frame (frame )
461
+ else :
462
+ iframe = driver .locator (frame )
463
+ driver .reconnect (0.15 )
464
+ driver .switch_to .frame (iframe )
465
+
466
+
456
467
def edgedriver_on_path ():
457
468
return os .path .exists (LOCAL_EDGEDRIVER )
458
469
@@ -3574,6 +3585,11 @@ def get_local_driver(
3574
3585
driver .uc_click = lambda * args , ** kwargs : uc_click (
3575
3586
driver , * args , ** kwargs
3576
3587
)
3588
+ driver .uc_switch_to_frame = (
3589
+ lambda * args , ** kwargs : uc_switch_to_frame (
3590
+ driver , * args , ** kwargs
3591
+ )
3592
+ )
3577
3593
if mobile_emulator :
3578
3594
uc_metrics = {}
3579
3595
if (
You can’t perform that action at this time.
0 commit comments