Skip to content

Commit 808b252

Browse files
committed
Update a presentation
1 parent ab9d898 commit 808b252

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

examples/presenter/web_scraping_on_gha.py

+54
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from contextlib import suppress
12
from seleniumbase import BaseCase
23
BaseCase.main(__name__, __file__)
34

@@ -7,6 +8,54 @@ def test_hacking_with_cdp(self):
78
self.open("data:,")
89
self.set_window_position(4, 40)
910
self._output_file_saves = False
11+
self.create_presentation(theme="serif", transition="none")
12+
self.add_slide("<h2>Press SPACE to continue!</h2>\n")
13+
self.add_slide(
14+
"<h3><b>Before we begin</b></h3><hr />"
15+
"<p><b>(Here's the GitHub page)</b></p>",
16+
image="https://seleniumbase.io/other/sbase_qr_code.png",
17+
)
18+
self.begin_presentation(filename="uc_presentation.html")
19+
20+
with suppress(Exception):
21+
self.open("https://www.bostoncodecamp.com/CC38/info")
22+
self.create_tour(theme="hopscotch")
23+
self.add_tour_step(
24+
"<h2>Good Afternoon and Welcome!</h2>", 'h1.wow'
25+
)
26+
self.add_tour_step(
27+
"<h4>PSA: Visit our sponsors later.</h4>",
28+
'[href*="/Sponsors"]',
29+
)
30+
self.add_tour_step(
31+
"<h4>Let's check out the schedule...</h4>",
32+
'[href*="/Schedule/SessionGrid"]'
33+
)
34+
self.play_tour()
35+
36+
with suppress(Exception):
37+
self.open(
38+
"https://www.bostoncodecamp.com/CC38/Schedule/SessionGrid"
39+
)
40+
self.highlight("h2", loops=8)
41+
if self.is_element_visible('[data-sessionid="869465"]'):
42+
self.highlight(
43+
'div[data-sessionid="869465"]', loops=10, scroll=False
44+
)
45+
self.create_tour(theme="driverjs")
46+
self.add_tour_step(
47+
"<h2>Here we are</h2>", '[data-sessionid="869465"]'
48+
)
49+
self.play_tour()
50+
self.click('a[onclick*="869465"]')
51+
self.create_tour(theme="hopscotch")
52+
self.add_tour_step(
53+
"<h2>What to expect</h2>",
54+
"div.sz-modal-session",
55+
alignment="left",
56+
)
57+
self.play_tour()
58+
1059
self.create_presentation(theme="serif", transition="none")
1160
self.add_slide("<h2>Press SPACE to begin!</h2>\n")
1261
self.add_slide(
@@ -244,4 +293,9 @@ def test_hacking_with_cdp(self):
244293
'<img src="https://seleniumbase.io/other/hackers_at_comp.jpg"'
245294
' width="70%">'
246295
)
296+
self.add_slide(
297+
"<h3><b>Live Demo Time!</b></h3><hr />"
298+
"<h3>(Let's head over to GitHub...)</h3>",
299+
image="https://seleniumbase.io/other/sbase_qr_code.png",
300+
)
247301
self.begin_presentation(filename="uc_presentation.html")

0 commit comments

Comments
 (0)