-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2667 from seleniumbase/fix-issue-with-uc-mode
Fix issue with UC Mode
- Loading branch information
Showing
7 changed files
with
47 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
from seleniumbase import SB | ||
|
||
with SB(uc=True, test=True) as sb: | ||
sb.driver.uc_open_with_reconnect("nopecha.com/demo/turnstile", 4.5) | ||
sb.switch_to_frame("#example-container5 iframe") | ||
sb.driver.uc_click("span.mark", reconnect_time=3) | ||
|
||
sb.driver.uc_open_with_reconnect("nopecha.com/demo/turnstile", 3.4) | ||
if sb.is_element_visible("#example-container0 iframe"): | ||
sb.switch_to_frame("#example-container0 iframe") | ||
if not sb.is_element_visible("circle.success-circle"): | ||
sb.driver.uc_click("span.mark", reconnect_time=3) | ||
sb.switch_to_frame("#example-container0 iframe") | ||
sb.assert_element("circle.success-circle") | ||
sb.switch_to_parent_frame() | ||
sb.switch_to_default_content() | ||
|
||
sb.switch_to_frame("#example-container5 iframe") | ||
sb.driver.uc_click("span.mark", reconnect_time=2.5) | ||
sb.switch_to_frame("#example-container5 iframe") | ||
sb.assert_element("svg#success-icon", timeout=3) | ||
sb.switch_to_parent_frame() | ||
|
||
if sb.is_element_visible("#example-container0 iframe"): | ||
sb.switch_to_frame("#example-container0 iframe") | ||
sb.assert_element("circle.success-circle") | ||
sb.switch_to_parent_frame() | ||
|
||
sb.set_messenger_theme(location="top_center") | ||
sb.post_message("SeleniumBase wasn't detected!", duration=3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# seleniumbase package | ||
__version__ = "4.25.1" | ||
__version__ = "4.25.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters