MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / create_presentation

Method create_presentation

seleniumbase/fixtures/base_case.py:12312–12414  ·  view source on GitHub ↗

Creates a Reveal-JS presentation that you can add slides to. @Params name - If creating multiple presentations at the same time, use this to specify the name of the current presentation. theme - Set a theme with a unique style for the presentation.

(
        self, name=None, theme="default", transition="default"
    )

Source from the content-addressed store, hash-verified

12310 ############
12311
12312 def create_presentation(
12313 self, name=None, theme="default", transition="default"
12314 ):
12315 """Creates a Reveal-JS presentation that you can add slides to.
12316 @Params
12317 name - If creating multiple presentations at the same time,
12318 use this to specify the name of the current presentation.
12319 theme - Set a theme with a unique style for the presentation.
12320 Valid themes: "serif" (default), "sky", "white", "black",
12321 "simple", "league", "moon", "night",
12322 "beige", "blood", and "solarized".
12323 transition - Set a transition between slides.
12324 Valid transitions: "none" (default), "slide", "fade",
12325 "zoom", "convex", and "concave"."""
12326 if not name:
12327 name = "default"
12328 if not theme or theme == "default":
12329 theme = "serif"
12330 valid_themes = [
12331 "serif",
12332 "white",
12333 "black",
12334 "beige",
12335 "simple",
12336 "sky",
12337 "league",
12338 "moon",
12339 "night",
12340 "blood",
12341 "solarized",
12342 ]
12343 theme = theme.lower()
12344 if theme not in valid_themes:
12345 raise Exception(
12346 "Theme {%s} not found! Valid themes: %s"
12347 % (theme, valid_themes)
12348 )
12349 if not transition or transition == "default":
12350 transition = "none"
12351 valid_transitions = [
12352 "none",
12353 "slide",
12354 "fade",
12355 "zoom",
12356 "convex",
12357 "concave",
12358 ]
12359 transition = transition.lower()
12360 if transition not in valid_transitions:
12361 raise Exception(
12362 "Transition {%s} not found! Valid transitions: %s"
12363 % (transition, valid_transitions)
12364 )
12365 reveal_theme_css = None
12366 if theme == "serif":
12367 reveal_theme_css = constants.Reveal.SERIF_MIN_CSS
12368 elif theme == "sky":
12369 reveal_theme_css = constants.Reveal.SKY_MIN_CSS

Calls

no outgoing calls

Tested by 15

test_presentationMethod · 0.64
test_presentation_5Method · 0.64
test_presentation_4Method · 0.64
test_presentationMethod · 0.64
test_presentationMethod · 0.64
test_py_virtual_envsMethod · 0.64
test_hacking_with_cdpMethod · 0.64
test_presenterMethod · 0.64
test_presentation_3Method · 0.64
test_hacking_with_cdpMethod · 0.64
test_multi_seriesMethod · 0.64