4
4
class MyPresenterClass (BaseCase ):
5
5
6
6
def test_presenter (self ):
7
- self .create_presentation ()
7
+ self .create_presentation (theme = "serif" )
8
8
self .add_slide (
9
- "<h2 >Welcome!</h2>"
10
- "<h4>Enjoy the Presentation!</h4>" )
9
+ '<h1 >Welcome</h1><br /> \n '
10
+ '<h3>Press the <b>Right Arrow</b></h3>' )
11
11
self .add_slide (
12
- '<h3>SeleniumBase "Presenter"</h3>'
13
- '<img src="https://seleniumbase.io/img/logo3a.png"></img>'
14
- '<h4>A tool for creating presentations</h4>' )
12
+ '<h3>SeleniumBase Presenter</h3><br />\n '
13
+ '<img width="240" src="https://seleniumbase.io/img/logo3a.png" />'
14
+ '<span style="margin:144px;" />'
15
+ '<img src="https://seleniumbase.io/other/python_3d_logo.png" />'
16
+ '<br /><br />\n <h4>Create presentations with <b>Python</b></h4>' )
15
17
self .add_slide (
16
- '<h3>You can add HTML to any slide:</h3><br />'
17
- '<table style="padding:10px;border:4px solid black;font-size:60;">'
18
- '<tr><th>Row 1</th><th>Row 2</th></tr>'
19
- '<tr><td>Value 1</td><td>Value 2</td></tr></table><br />'
20
- '<h4>(HTML table example)</h4>' )
18
+ '<h3>Make slides using <b>HTML</b>:</h3><br />\n '
19
+ '<table style="padding:10px;border:4px solid black;font-size:50;">'
20
+ '\n <tr style="background-color:CDFFFF;">\n '
21
+ '<th>Row ABC</th><th>Row XYZ</th></tr>\n '
22
+ '<tr style="background-color:DCFDDC;">'
23
+ '<td>Value ONE</td><td>Value TWO</td></tr>\n '
24
+ '<tr style="background-color:DFDFFB;">\n '
25
+ '<td>Value THREE</td><td>Value FOUR</td></tr>\n '
26
+ '</table><br />\n <h4>(HTML <b>table</b> example)</h4>' )
21
27
self .add_slide (
22
- "<h3>You can display code:</h3>" ,
28
+ '<h3>Keyboard Shortcuts:</h3>\n '
29
+ '<table style="padding:10px;border:4px solid black;font-size:30;'
30
+ 'background-color:FFFFDD;">\n '
31
+ '<tr><th>Key</th><th>Action</th></tr>\n '
32
+ '<tr><td><b>=></b></td><td>Next Slide (N also works)</td></tr>\n '
33
+ '<tr><td><b><=</b></td><td>Previous Slide (P also works)</td></tr>'
34
+ '\n <tr><td>F</td><td>Full Screen Mode</td></tr>\n '
35
+ '<tr><td>O</td><td>Overview Mode Toggle</td></tr>\n '
36
+ '<tr><td>esc</td><td>Exit Full Screen / Overview Mode</td></tr>\n '
37
+ '<tr><td><b>.</b></td><td>Pause/Resume Toggle</td></tr>\n '
38
+ '<tr><td>space</td><td>Next Slide (alternative)</td></tr></table>'
39
+ )
40
+ self .add_slide (
41
+ '<h3>Add <b>images</b> to slides:</h3>' ,
42
+ image = "https://seleniumbase.io/other/seagulls.jpg" )
43
+ self .add_slide (
44
+ '<h3>Add <b>code</b> to slides:</h3>' ,
23
45
code = (
24
46
'from seleniumbase import BaseCase\n \n '
25
47
'class MyTestClass(BaseCase):\n \n '
@@ -36,21 +58,26 @@ def test_presenter(self):
36
58
' self.click_link_text("About")\n '
37
59
' self.assert_exact_text("xkcd.com", "h2")\n ' ))
38
60
self .add_slide (
39
- "<h3>You can highlight code :</h3>" ,
61
+ "<h3>Highlight <b>code</b> in slides :</h3>" ,
40
62
code = (
41
63
'from seleniumbase import BaseCase\n \n '
42
64
'<mark>class MyTestClass(BaseCase):</mark>\n \n '
43
65
' def test_basic(self):\n '
44
66
' self.open("https://store.xkcd.com/search")\n '
45
- ' self.type(\' input[name="q"]\' , "xkcd book\\ n")\n ' ))
67
+ ' self.type(\' input[name="q"]\' , "xkcd book\\ n")\n '
68
+ ' self.assert_text("xkcd: volume 0", "h3")\n ' ))
46
69
self .add_slide (
47
- " <h3>You can add notes to slides:</h3>" ,
48
- notes = "<h2><ul><li>Note A!<li>Note B!<li>Note C!<li>Note D!</h2> " )
70
+ ' <h3>Add <b>iFrames</b> to slides:</h3>' ,
71
+ iframe = "https://seleniumbase.io/demo_page " )
49
72
self .add_slide (
50
- "<h3>You can add images to slides:</h3>" ,
51
- image = "https://seleniumbase.io/img/sb_logo_10.png" )
73
+ '<h3>Include <b>notes</b> with slides:</h3><br />' ,
74
+ code = ('self.add_slide("[Your HTML goes here]",\n '
75
+ ' code="[Your software code goes here]",\n '
76
+ ' content2="[Additional HTML goes here]",\n '
77
+ ' notes="[Attached speaker notes go here]")' ),
78
+ content2 = '<h4>(Example Presenter Usage)</h4>' ,
79
+ notes = '<h2><ul><li>Note A!<li>Note B!<li>Note C!<li>Note D!</h2>' )
52
80
self .add_slide (
53
- "<h3>You can add iframes to slides:</h3>" ,
54
- iframe = "https://seleniumbase.io/demo_page" )
55
- self .add_slide ("<h1>The End</h1>" )
56
- self .begin_presentation ()
81
+ '<h2><b>The End</b></h2>' ,
82
+ image = "https://seleniumbase.io/img/sb_logo_10.png" )
83
+ self .begin_presentation (filename = "my_presentation.html" , interval = 0 )
0 commit comments