Skip to content

Commit c8271b0

Browse files
committed
Add a mobile device test of the Skype website
1 parent 4020757 commit c8271b0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

examples/test_skype_site.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
This is a mobile device test for Chromium-based browsers (such as MS Edge)
3+
Usage: pytest test_skype_site.py --mobile --browser=edge
4+
5+
Default mobile settings for User Agent and Device Metrics if not specifed:
6+
User Agent: --agent="Mozilla/5.0 (Linux; Android 9; Pixel 3 XL)"
7+
CSS Width, CSS Height, Pixel-Ratio: --metrics="411,731,3"
8+
"""
9+
from seleniumbase import BaseCase
10+
11+
12+
class SkypeWebsiteTestClass(BaseCase):
13+
14+
def test_skype_website_on_mobile(self):
15+
if not self.mobile_emulator:
16+
print("\n This test is only for mobile devices / emulators!")
17+
print(" (Usage: '--mobile' with a Chromium-based browser.)")
18+
self.skip_test("Please rerun this test using '--mobile!'!")
19+
self.open("https://www.skype.com/en/")
20+
self.assert_text("Install Skype", "div.appInfo")
21+
self.highlight("div.appBannerContent")
22+
self.highlight('[itemprop="url"]')
23+
self.highlight("h1")
24+
self.highlight_click('[title="Download Skype"]')
25+
self.assert_element('[aria-label="Microsoft"]')
26+
self.assert_text("Download Skype", "h1")
27+
self.highlight("div.appBannerContent")
28+
self.highlight("h1")
29+
self.assert_text("Skype for Mobile", "h2")
30+
self.highlight("h2")
31+
self.highlight("#get-skype-0")
32+
self.highlight_click('[title*="Select from list"]')
33+
self.highlight('[data-bi-id*="android"]')
34+
self.highlight('[data-bi-id*="ios"]')
35+
self.highlight('[data-bi-id*="windows10"]')

0 commit comments

Comments
 (0)