{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# KEYWORDS\n", "Keywords are the the smallest unit of Robot Framework tasks and tests. The built-in Robot Framework documentation is _pretty good_, but for various reasons, are split out below.\n", "\n", "> _click 🔎 in the bottom right to filter_" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Browser + Server\n", "`JupyterLibrary` inherits all of the keywords of [SeleniumLibrary](http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html), and then adds a few more, including the two most important ones:\n", "\n", "- **Wait For New Jupyter Server To Be Ready**\n", "- **Terminate All Jupyter Servers**\n", "\n", "All the server keywords include _Jupyter_ in the keyword name, and all of the client keywords are also dynamically loaded. A few screenshot convenience methods are also provided." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "iframe = lambda url: __import__(\"IPython\").display.IFrame(f\"_static/{url}.html\", width=\"100%\", height=\"\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "iframe(\"JupyterLibrary\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Clients\n", "\n", "The Jupyter client keywords are themselves defined in `.robot` files, and are loaded dynamically. They all include the name of the client in the keyword name." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### JupyterLab" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "iframe(\"jupyterlab\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Jupyter Notebook" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "iframe(\"notebook\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Jupyter Notebook Classic" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "iframe(\"classic\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Common\n", "A number of libraries are shared between multiple frontends, and so can use the same underlying keywords." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### CodeMirror\n", "The real workhorse of the Jupyter code editing experience, [CodeMirror 6](https://codemirror.net) is used by JupyterLab and Notebook, while Notebook Classic uses [CodeMirror 5](https://codemirror.net/5/)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "remove-input" ] }, "outputs": [], "source": [ "iframe(\"codemirror\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.3" } }, "nbformat": 4, "nbformat_minor": 4 }