\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{ZH (openkeyword)} \pdfinfo{ /Title (openkeyword-cheat-sheet.pdf) /Creator (Cheatography) /Author (ZH (openkeyword)) /Subject (OpenKeyWord Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{53A315} \definecolor{LightBackground}{HTML}{F4F9F0} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{OpenKeyWord Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{ZH (openkeyword)} via \textcolor{DarkBackground}{\uline{cheatography.com/68516/cs/17262/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}ZH (openkeyword) \\ \uline{cheatography.com/openkeyword} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 2nd June, 2021.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{p{0.8 cm} p{0.8 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Testcase Keywords}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{BeginTest( TCN )} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{EndTest( )} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.6 cm} x{4.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Application Handling}} \tn % Row 0 \SetRowColor{LightBackground} `EN.StartApp( "MyApp" );` & Starts the application "MyApp" \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `EN.StopApp( "MyApp" );` & Stops the application "MyApp" \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.96 cm} x{5.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{User Activities Keywords}} \tn % Row 0 \SetRowColor{LightBackground} `ClickOn( CAT )` & Executes a single left-click on the GUI-Object with the functional name {\bf{FN}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \seqsplit{`DoubleClickOn(} CAT )` & Keyword executes a double left-click on the GUI-Object with the category name `CAT` \tn % Row Count 8 (+ 4) % Row 2 \SetRowColor{LightBackground} `SetFocus( CAT );` & Sets the focus to the GUI-Object with the category name {\bf{CAT}} \tn % Row Count 11 (+ 3) % Row 3 \SetRowColor{white} `SetValue( CAT, VAL );` & Sets the text-content of the GUI-Object FN to the given `VAL`\{\{nl\}\} Der Unterscheid zwischen TypeKey und SetValue ist, das TypeKey die Tastatur Simuliert \tn % Row Count 18 (+ 7) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{`TypeKey( CAT, VAL );`} \tn % Row Count 19 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{`Select( CAT, VAL );`} \tn % Row Count 20 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{{\bf{Example 1:}} \newline \newline `EN.SelectWindow( "Login" );` \newline `EN.SetValue( "User", "myValue" );` \newline `EN.SetValue( "Password", "myPassword" ;` \newline `EN.Select( "Domain", "harmony.ac" );` \newline `EN.ClickOn( "OK" );` \newline \newline \newline {\bf{Example 2:}} Same Example with TypeKey and Select. \newline \newline `EN.SelectWindow( "Login" );` \newline `EN.TypeKey( "User", "myValue" );` \newline `EN.TypeKey( "Password", "myPassword" );` \newline `EN.Select( "Domain", "harmony.ac" );` \newline `EN.ClickOn( "OK" );`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.56 cm} x{5.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{User Activities with Data}} \tn % Row 0 \SetRowColor{LightBackground} SetValue( FN, Val ) & Sets the text-content of the GUI-Object {\bf{FN}} to the given {\bf{Val}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Select( FN, Val ) & Selects the given value or values of the GUI-Object {\bf{FN}}. Select is mostly Used with List-Objects to slect one or more possible options. \tn % Row Count 9 (+ 6) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{TypeKey( FN, Val )} \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.44 cm} x{6.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Constants}} \tn % Row 0 \SetRowColor{LightBackground} \$\{DELETE\} & The value of the GUI object will be deleted/cleared. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \$\{IGNORE\} & A OKW-keyword is skipped when {\bf{\$\{IGNORE\}}} is entered as a value. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\$\{EMPTY\}} \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} \$\{SEP\} & {\bf{\$\{SEP\}}} is used to separate values. E.g. multiple selection in a ListBox. \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\$\{TCS\}} \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{0.96 cm} x{7.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{OKW Annotation}} \tn % Row 0 \SetRowColor{LightBackground} FN & Functional Name \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{WaitForMe\_TO} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{WaitForMe\_PT} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyHasFocus\_TO} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyHasFocus\_PT} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyHasFocus\_TO} \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyHasFocus\_PT} \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyIsActive\_TO} \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyIsActive\_PT} \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyLabel\_TO} \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyLabel\_PT} \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifySelectedValue\_TO} \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifySelectedValue\_PT} \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyTablecellValue\_TO} \tn % Row Count 14 (+ 1) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyTablecellValue\_PT} \tn % Row Count 15 (+ 1) % Row 15 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyTooltip\_TO} \tn % Row Count 16 (+ 1) % Row 16 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyTooltip\_PT} \tn % Row Count 17 (+ 1) % Row 17 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyValue\_TO} \tn % Row Count 18 (+ 1) % Row 18 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyValue\_PT} \tn % Row Count 19 (+ 1) % Row 19 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyCaption\_TO} \tn % Row Count 20 (+ 1) % Row 20 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyCaption\_PT} \tn % Row Count 21 (+ 1) % Row 21 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{VerifyExists\_TO} \tn % Row Count 22 (+ 1) % Row 22 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{VerifyExists\_PT} \tn % Row Count 23 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{{\bf{*\_PO}} - {\bf{Polling Time}} is allway in {[}ms{]} =\textgreater{} 1sec \textless{}=\textgreater{} *\_PO=1000 \newline {\bf{*\_TO}} - {\bf{TimeOut}} is allway given in {[}s{]} =\textgreater{} 1sec \textless{}=\textgreater{} *\_PT=1 \newline \newline {\bf{Example:}} \newline `@OKW( FN = "Funktional Name", VerifyExists\_TO="5" )`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.36 cm} x{6.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Glossary}} \tn % Row 0 \SetRowColor{LightBackground} `AN` & {\bf{A}}pp {\bf{N}}ame, e.g. "Chrome"; "Firefox" \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `CAT` & Categorie-name, the name of Variable or GUI-Object \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} 'Val' & Value. This is the input value used in UserActions \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{`ExpVal`} & Expected Value: Use in Verify* Keyword. \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{XPath}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`//*{[}contains(@class, 'myclass'){]}` - find all elements that contains 'myclass' in class} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{`//*{[}contains(text(), 'qwerty'){]}` - find all elements that contains 'qwerty' as text} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`//*{[}normalize-space()="qwerty"{]}` - find all elements that have 'qwerty' as text. The normalize-space function strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.} \tn % Row Count 10 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}