Skip to content

Commit 5c54dfe

Browse files
committed
Update the Edge presentation
1 parent 8c0e92d commit 5c54dfe

File tree

1 file changed

+15
-57
lines changed

1 file changed

+15
-57
lines changed

examples/presenter/edge_presentation.py

Lines changed: 15 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
if __name__ == "__main__":
44
from pytest import main
5-
main([__file__, "--edge", "-s"])
5+
main([__file__, "--edge", "-s", "--disable-csp"])
66

77

88
class EdgePresentationClass(BaseCase):
99
def test_presentation(self):
10-
if not self.browser == "edge":
10+
if not self.browser == "edge" or not self.disable_csp:
1111
self.driver.quit()
12-
self.get_new_driver(browser="edge")
12+
self.get_new_driver(browser="edge", disable_csp=True)
1313
self.demo_mode = False
1414
self.maximize_window()
15+
self._output_file_saves = False
1516
self.create_presentation(theme="serif", transition="fade")
1617
self.add_slide(
1718
"<h3>A deep dive into:</h3>"
@@ -76,7 +77,7 @@ def test_presentation(self):
7677
if self.is_element_visible('button[data-bi-name="close"]'):
7778
self.click('button[data-bi-name="close"]')
7879
self.wait_for_element_not_visible('button[data-bi-name="close"]')
79-
self.highlight("div.mainContainer")
80+
self.highlight("h1#test-and-automation-in-microsoft-edge")
8081
self.create_tour(theme="driverjs")
8182
self.add_tour_step(
8283
"", "h1#test-and-automation-in-microsoft-edge", alignment="right"
@@ -119,30 +120,6 @@ def test_presentation(self):
119120
)
120121
self.play_tour()
121122
self.highlight('img[src*="microsoft-edge-version"]')
122-
123-
self.get_new_driver(browser="edge")
124-
self.maximize_window()
125-
self.open("edge://settings/help")
126-
zoom_in = (
127-
'img[srcset*="logo"] + div span:nth-of-type(2)'
128-
'{zoom: 1.5;-moz-transform: scale(1.5);}'
129-
)
130-
self.add_css_style(zoom_in)
131-
self.highlight('div[role="main"]')
132-
self.highlight('img[srcset*="logo"]')
133-
self.highlight('img[srcset*="logo"] + div span:nth-of-type(1)')
134-
self.highlight(
135-
'img[srcset*="logo"] + div span:nth-of-type(2)', loops=16
136-
)
137-
if self.is_element_visible('span[aria-live="assertive"]'):
138-
self.highlight('span[aria-live="assertive"]', loops=8)
139-
elif self.is_element_visible('a[href*="fwlink"]'):
140-
self.highlight('a[href*="fwlink"]', loops=8)
141-
self.highlight('a[href*="chromium"]')
142-
self.highlight('a[href*="credits"]')
143-
self.quit_extra_driver()
144-
145-
self.switch_to_default_driver()
146123
self.highlight('img[src*="microsoft-edge-driver-install"]', loops=8)
147124
self.highlight('p:contains("that matches your version")', loops=8)
148125

@@ -164,25 +141,11 @@ def test_presentation(self):
164141
zoom_in = 'div.h1{zoom: 1.02;-moz-transform: scale(1.02);}'
165142
self.add_css_style(zoom_in)
166143
self.highlight("div.common-heading", loops=8)
167-
self.create_tour(theme="driverjs")
168-
self.add_tour_step(
169-
"", "div.common-heading", alignment="left"
170-
)
171-
self.play_tour()
172-
self.highlight('div[data-fetch-key="block-web-driver:0"]', loops=12)
173-
self.create_tour(theme="driverjs")
174-
self.add_tour_step(
175-
"", 'div[data-fetch-key="block-web-driver:0"]', alignment="top"
176-
)
177-
self.play_tour()
178-
self.highlight('div[data-fetch-key="block-web-driver:1"]', loops=12)
179-
self.create_tour(theme="driverjs")
180-
self.add_tour_step(
181-
"", 'div[data-fetch-key="block-web-driver:1"]', alignment="top"
182-
)
144+
self.create_tour(theme="hopscotch")
145+
self.add_tour_step("", "div.common-heading", alignment="right")
183146
self.play_tour()
184-
self.highlight('section[data-section-id="installation"]', loops=12)
185-
self.create_tour(theme="driverjs")
147+
148+
self.create_tour(theme="hopscotch")
186149
self.add_tour_step(
187150
"", "div.block-heading--sixtyforty", alignment="left"
188151
)
@@ -491,17 +454,12 @@ def test_presentation(self):
491454
self.sleep(0.25)
492455
self.get_new_driver(browser="edge", is_mobile=True)
493456
self.maximize_window()
494-
self.open("https://www.skype.com/en/get-skype/")
495-
self.assert_element('[aria-label="Microsoft"]')
496-
self.assert_text("Download Skype", "h1")
497-
self.highlight("div.appBannerContent")
498-
self.highlight("h1")
499-
self.assert_text("Skype for Mobile", "h2")
500-
self.highlight("h2")
501-
self.highlight("#get-skype-0")
502-
self.highlight_click("span[data-dropdown-icon]")
503-
self.highlight("#get-skype-0_android-download")
504-
self.highlight('[data-bi-id*="ios"]')
457+
self.open("https://www.roblox.com/")
458+
self.assert_element("#download-the-app-container")
459+
self.assert_text("Roblox for Android")
460+
self.assert_text("Continue in App", "a.content-action-emphasis")
461+
self.highlight('span:contains("Roblox for Android")', loops=8)
462+
self.highlight("a.content-action-emphasis", loops=8)
505463
self.quit_extra_driver()
506464

507465
self.create_presentation(theme="serif", transition="fade")

0 commit comments

Comments
 (0)