(driver, url)
| 568 | |
| 569 | |
| 570 | def uc_open_with_tab(driver, url): |
| 571 | url = shared_utils.fix_url_as_needed(url) |
| 572 | if __is_cdp_swap_needed(driver): |
| 573 | driver.cdp.get(url) |
| 574 | time.sleep(0.3) |
| 575 | return |
| 576 | if (url.startswith("http:") or url.startswith("https:")): |
| 577 | if not hasattr(driver, "cdp_base"): |
| 578 | with driver: |
| 579 | driver.execute_script('window.open("%s","_blank");' % url) |
| 580 | driver.close() |
| 581 | else: |
| 582 | driver.cdp.open(url) |
| 583 | page_actions.switch_to_window(driver, driver.window_handles[-1], 2) |
| 584 | else: |
| 585 | driver.default_get(url) # The original one |
| 586 | return None |
| 587 | |
| 588 | |
| 589 | def uc_open_with_reconnect(driver, url, reconnect_time=None): |
no test coverage detected
searching dependent graphs…