diff --git a/examples/test_skype_site.py b/examples/test_skype_site.py new file mode 100755 index 00000000..a0e2e7f5 --- /dev/null +++ b/examples/test_skype_site.py @@ -0,0 +1,35 @@ +""" +This is a mobile device test for Chromium-based browsers (such as MS Edge) +Usage: pytest test_skype_site.py --mobile --browser=edge + +Default mobile settings for User Agent and Device Metrics if not specifed: + User Agent: --agent="Mozilla/5.0 (Linux; Android 9; Pixel 3 XL)" + CSS Width, CSS Height, Pixel-Ratio: --metrics="411,731,3" +""" +from seleniumbase import BaseCase + + +class SkypeWebsiteTestClass(BaseCase): + + def test_skype_website_on_mobile(self): + if not self.mobile_emulator: + print("\n This test is only for mobile devices / emulators!") + print(" (Usage: '--mobile' with a Chromium-based browser.)") + self.skip_test("Please rerun this test using '--mobile!'!") + self.open("https://www.skype.com/en/") + self.assert_text("Install Skype", "div.appInfo") + self.highlight("div.appBannerContent") + self.highlight('[itemprop="url"]') + self.highlight("h1") + self.highlight_click('[title="Download Skype"]') + self.assert_element('[aria-label="Microsoft"]') + self.assert_text("Download Skype", "h1") + self.highlight("div.appBannerContent") + self.highlight("h1") + self.assert_text("Skype for Mobile", "h2") + self.highlight("h2") + self.highlight("#get-skype-0") + self.highlight_click('[title*="Select from list"]') + self.highlight('[data-bi-id*="android"]') + self.highlight('[data-bi-id*="ios"]') + self.highlight('[data-bi-id*="windows10"]') diff --git a/seleniumbase/config/proxy_list.py b/seleniumbase/config/proxy_list.py index 2bf9fbda..16225b30 100755 --- a/seleniumbase/config/proxy_list.py +++ b/seleniumbase/config/proxy_list.py @@ -21,7 +21,6 @@ you can try finding one from one of following sites: PROXY_LIST = { "example1": "52.187.121.7:3128", # (Example) - set your own proxy here "example2": "193.32.6.6:8080", # (Example) - set your own proxy here - "example3": "185.204.208.78:8080", # (Example) - set your own proxy here "proxy1": None, "proxy2": None, "proxy3": None, diff --git a/seleniumbase/fixtures/js_utils.py b/seleniumbase/fixtures/js_utils.py index 9ab908f0..cd610211 100755 --- a/seleniumbase/fixtures/js_utils.py +++ b/seleniumbase/fixtures/js_utils.py @@ -6,6 +6,7 @@ import re import requests import time from selenium.common.exceptions import WebDriverException +from seleniumbase import config as sb_config from seleniumbase.common import decorators from seleniumbase.config import settings from seleniumbase.core import style_sheet @@ -542,7 +543,12 @@ def post_messenger_success_message(driver, message, msg_dur): msg_dur = settings.DEFAULT_MESSAGE_DURATION msg_dur = float(msg_dur) try: - set_messenger_theme(driver, theme="future", location="bottom_right") + theme = "future" + location = "bottom_right" + if sb_config.mobile_emulator: + theme = "block" + location = "top_center" + set_messenger_theme(driver, theme=theme, location=location) post_message( driver, message, msg_dur, style="success") time.sleep(msg_dur + 0.07) diff --git a/setup.py b/setup.py index 96f753aa..a9ea9a8b 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ if sys.argv[-1] == 'publish': setup( name='seleniumbase', - version='1.34.23', + version='1.34.24', description='Fast, Easy, and Reliable Browser Automation & Testing.', long_description=long_description, long_description_content_type='text/markdown',