--- tags: NPM github opensourse --- # seide2sideeX Documnet * Selenium command * SideeX command * Target * Value * Warning * Example ### addSelection <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td>addSelection</td> <td>addSelection</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator of a multi-select box</td> </tr> <tr> <td><b>Value</b></td> <td>The value to input.</td> <td>An option locator of the element to be added. For example: label=Option1.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "addSelection", "target": "id=fruits", "value": "label=Banana" // sideeX .json "name": "addSelection", "target": "id=fruits", "value": "Banana" ``` ### answerOnNextPrompt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td>answerOnNextPrompt</td> <td>answerOnNextPrompt</td> </tr> <tr> <td><b>Target</b></td> <td>The answer to give in response to the prompt pop-up</td> <td>The string to be set to the next prompt pop-up</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Make sure this command appears before the 'assertPrompt' command.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "answerOnNextPrompt", "target": "", "value": "" // sideeX .json "name": "answerOnNextPrompt", "target": "", "value": "" ``` ### assertAlert <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertAlert</td> <td>assertAlert</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The expected alert message</td> <td>The expected alert message</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertAlert", "target": "String", "value": "" // sideeX .json "name": "assertAlert", "target": "String", "value": "" ``` ### assertChecked <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b> command name </b></td> <td>assertChecked</td> <td>assertValue</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The expected value of the target element.(Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertChecked", "target": "id=flexCheckChecked", "value": "" // sideeX .json "name": "assertValue", "target": "id=flexCheckChecked", "value": "on" ``` ### assertConfirmation <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertConfirmation</td> <td>assertConfirmation</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The text to use</td> <td>The expected confirmation message</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertConfirmation", "target": "String", "value": "" // sideeX .json "name": "assertConfirmation", "target": "String", "value": "" ``` ### assertElementPresent <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertElementPresent</td> <td>assertPresence</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertElementPresent", "target": "id=Button", "value": "" // sideeX .json "name": "assertPresence", "target": "id=Button", "value": "" ``` ### assertNotChecked <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td>assertNotChecked</td> <td>assertValue</td> </tr> <tr> <td><b>Target</b></td> <td>A locator</td> <td>An element locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The expected value of the target element (Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertNotChecked", "target": "id=flexCheckDefault", "value": "" // sideeX .json "name": "assertValue", "target": "id=flexCheckDefault", "value": "off" ``` ### assertPrompt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertPrompt</td> <td>assertPrompt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The expected prompt message</td> <td>The expected prompt message</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertPrompt", "target": "String", "value": "" // sideeX .json "name": "assertPrompt", "target": "String", "value": "" ``` ### assertText <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertText</td> <td>assertText</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>An exact string match. Support for pattern matching is in the works.</td> <td>The expected text of the target element (Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertText", "target": "id=text", "value": "String" // sideeX .json "name": "assertText", "target": "id=text", "value": "String" ``` ### assertTitle <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertTitle</td> <td>assertTitle</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An exact string match. Support for pattern matching is in the works.</td> <td>The expected string of the title (Exact matching)</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertTitle", "target": "String", "value": "" // sideeX .json "name": "assertTitle", "target": "String", "value": "" ``` ### assertValue <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>assertValue</td> <td>assertValue</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>An exact string match. Support for pattern matching is in the works.</td> <td>The expected value of the target element. (Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "assertValue", "target": "id=account", "value": "P12345" // sideeX .json "name": "assertValue", "target": "id=account", "value": "P12345" ``` ### check <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>check</td> <td>clickAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator.</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10. A blank value means a simple click.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "check", "target": "id=javascript", "value": "" // sideeX .json "command": "clickAt", "target": "id=javascript", "value": "" ``` ### chooseCancelOnNextConfirmation <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>chooseCancelOnNextConfirmation</td> <td>chooseCancelOnNextConfirmation</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Make sure this command appears before the 'assertConfirmation' command.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "chooseCancelOnNextConfirmation", "target": "", "value": "" // sideeX .json "command": "chooseCancelOnNextConfirmation", "target": "", "value": "" ``` ### chooseCancelOnNextPrompt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>chooseCancelOnNextPrompt</td> <td>chooseCancelOnNextPrompt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Make sure this command appears before the 'assertPrompt' command.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "chooseCancelOnNextPrompt", "target": "", "value": "" // sideeX .json "command": "chooseCancelOnNextPrompt", "target": "", "value": "" ``` ### chooseOkOnNextConfirmation <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>chooseOkOnNextConfirmation</td> <td>chooseOkOnNextConfirmation</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Make sure this command appears before the 'assertConfirmation' command.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "chooseOkOnNextConfirmation", "target": "", "value": "" // sideeX .json "command": "chooseOkOnNextConfirmation", "target": "", "value": "" ``` ### click <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>click</td> <td>clickAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10. A blank value means a simple click.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "click", "target": "id=demoClickAtButton", "value": "" // sideeX .json "command": "clickAt", "target": "id=demoClickAtButton", "value": "" ``` ### clickAt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>clickAt</td> <td>clickAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td> Specifies the x,y position (e.g., - 10,20) of the mouse event relative to the element found from a locator.</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10. A blank value means a simple click.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "clickAt", "target": "id=demoClickAtButton", "value": "10,20" // sideeX .json "command": "clickAt", "target": "id=demoClickAtButton", "value": "10,20" ``` ### close <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>close</td> <td>close</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>Auto-generated </td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "close", "target": "", "value": "" // sideeX .json "name": "close", "target": "win_ser_local", "value": "" ``` ### do repeatIf <table> <thead> <tr> <th></th> <th style="color: blue" colspan="2">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>do</td> <td>repeatIf</td> <td>WHILE</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>JavaScript expression that returns a boolean result for use in control flow commands.</td> <td>A JavaScript expression that returns a boolean result</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>An optional argument that specifies the maximum number of times a looping control flow command can execute. This protects against infinite loops. The defaults value is set to 1000.</td> <td>Maximum number of the loops. A blank value means no such maximum number restriction.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="3">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "do", "target": "", "value": "" "command": "echo", "target": "${test}", "value": "" "command": "executeScript", "target": "return ${test} + 1", "value": "test" "command": "repeatIf", "target": "${test} < 4", "value": "" // sideeX .json "command": "echo", "target": "${test}", "value": "" "command": "storeEval", "target": "${test} + 1", "value": "test" "command": "WHILE", "target": "${test} < 4", "value": "" "command": "echo", "target": "${test}", "value": "" "command": "storeEval", "target": "${test} + 1", "value": "test" "command": "END", "target": "${test}", "value": "" ``` ### doubleClick <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>doubleClick</td> <td>doubleClickAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td> N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "doubleClick", "target": "id=demoClickAtButton", "value": "" // sideeX .json "command": "doubleClickAt", "target": "id=demoClickAtButton", "value": "" ``` ### doubleClickAt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>doubleClickAt</td> <td>doubleClickAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>Specifies the x,y position (e.g., - 10,20) of the mouse event relative to the element found from a locator.</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10. A blank value means a simple double click.</td> </tr> <tr> <td><b>Description</b></td> <td colspan="2"> Double clicks on a target element (e.g., a link, button, checkbox, or radio button). The coordinates are relative to the target element (e.g., 0,0 is the top left corner of the element) and are mostly used to check effects that relay on them, for example the material ripple effect. </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "doubleClickAt", "target": "id=demoClickAtButton", "value": "10,20" // sideeX .json "command": "doubleClickAt", "target": "id=demoClickAtButton", "value": "10,20" ``` ### dragAndDropToObject <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>dragAndDropToObject</td> <td>dragAndDropToObject</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>Locator of object to be dragged</td> <td>Locator of object to be dragged</td> </tr> <tr> <td><b>Value</b></td> <td>Locator of drag destination object</td> <td>Locator of drag destination object</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "dragAndDropToObject", "target": "id=drag1", "value": "id=div2" // sideeX .json "name": "dragAndDropToObject", "target": "id=drag1", "value": "id=div2" ``` ### echo <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>echo</td> <td>echo</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The string or variable print on log panel</td> <td>The string or variable print on log panel</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "echo", "target": "Hello World", "value": "" // sideeX .json "name": "echo", "target": "Hello World", "value": "" ``` ### editContent <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>editContent</td> <td>editContent</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>The value to input.</td> <td>Edits the content of a content-editable element</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "editContent", "target": "css=p", "value": "Hello World" // sideeX .json "name": "editContent", "target": "css=p", "value": "Hello World" ``` ### else <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>else</td> <td>else</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "else", "target": "", "value": "" // sideeX .json "name": "else", "target": "", "value": "" ``` ### elseIf <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red" colspan="2">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>elseIf</td> <td>else</td> <td>if</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>JavaScript expression that returns a boolean result for use in control flow commands</td> <td>N/A</td> <td>A JavaScript expression that returns a boolean result</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="3">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "elseIf", "target": "${myVar} === 'b'", "value": "" // sideeX .json "name": "else", "target": "", "value": "" "name": "if", "target": "'${myVar}' === 'b'", "value": "" ``` ### end <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>end</td> <td>end</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Note that make sure add</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "end", "target": "", "value": "" // sideeX .json "name": "end", "target": "", "value": "" ``` ### executeScript <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>executeScript</td> <td>storeEval</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The JavaScript snippet to run</td> <td>A Javascript expression to be executed. <br>For example: x=2; y=3; z = Math.max(x,y);. The example expression will be evaluated to 3 and the evaluation result will be stored in the variable declared in Value.</br></td> </tr> <tr> <td><b>Value</b></td> <td>The name of a variable without brackets</td> <td>The name of the variable storing the evaluation result.<br>For example: var_result.</br></td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">executeScript command may still have some problems. Please check your command target. We delete all of the “return” in target. So it might get some problems if “return” is needed. Please add “return” manually.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "executeScript", "target": "x=2; y=3; return x+y;", "value": "myVar" // sideeX .json "name": "storeEval", "target": "x=2; y=3; x+y;", "value": "myVar" Warning Example: // selenium .side "command": "executeScript", "target": "let a = [1, 2, 3]; let b = a.map((num) => { return num*num;}); return b;", "value": "myVar" // sideeX .json // seide2sideex will delete all of the "return", but this answer is incorrect. //seide2sideex version (incorrect answer) "name": "storeEval", "target": "let a = [1, 2, 3]; let b = a.map((num) => { num*num;}); b;", "value": "myVar" //correct answer "name": "storeEval", "target": "let a = [1, 2, 3]; let b = a.map((num) => { return num*num;}); b;", "value": "myVar" ``` ### executeAsyncScript <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>executeAsyncScript</td> <td>storeEval</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The JavaScript snippet to run</td> <td>A Javascript expression to be executed. <br>For example: x=2; y=3; z = Math.max(x,y);. The example expression will be evaluated to 3 and the evaluation result will be stored in the variable declared in Value.</br></td> </tr> <tr> <td><b>Value</b></td> <td>The name of a variable without brackets.</td> <td>The name of the variable storing the evaluation result.<br>For example: var_result.</br></td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">executeAsyncScript command may still have some problems. Please check your command target. We delete all of the “return” in target. So it might get some problems if “return” is needed. Please add “return” manually.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "executeAsyncScript", "target": "return new Promise((r) => {setTimeout(() => {r(\"hello world\")}, 500)})", "value": "myVar" // sideeX .json "name": "storeEval", "target": "new Promise((r) => {setTimeout(() => {r(\"hello world\")}, 500)})", "value": "myVar" Warning Example: // Same condition as executeScript ``` ### forEach <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red" colspan="2">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>forEach</td> <td>storeEval</td> <td>WHILE</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The name of a variable containing a JavaScript array</td> <td>A Javascript expression to be executed. For example: x=2; y=3; z = Math.max(x,y);. The example expression will be evaluated to 3 and the evaluation result will be stored in the variable declared in Value.</td> <td>A JavaScript expression that returns a boolean result</td> </tr> <tr> <td><b>Value</b></td> <td>The name of the variable used when iterating over a collection in a looping control flow command. (e.g., for each)</td> <td>The name of the variable storing the evaluation result. For example: var_result.</td> <td>Maximum number of the loops. A blank value means no such maximum number restriction.</td> </tr> <tr> <td><b>Description</b></td> <td colspan="3"> The name of the variable used when iterating over a collection in a looping control flow command (e.g., for each). </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="3">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "executeScript", "target": "return [0,1,2,3,4,5,6,7,8,9,10]", "value": "test" "command": "forEach", "target": "test", "value": "iter" "command": "echo", "target": "${iter}", "value": "" "command": "end", "target": "", "value": "" // sideeX .json "command": "storeEval", "target": "return [0,1,2,3,4,5,6,7,8,9,10]", "value": "test" "command": "storeEval", "target": "-1", "value": "count1" "command": "storeEval", "target": "${test}.length", "value": "length1" "command": "WHILE", "target": "${count1} < ${length1} - 1", "value": "" "command": "storeEval", "target": "${count1} + 1", "value": "count1" "command": "storeEval", "target": "${test}[${count1}]", "value": "iter" "command": "echo", "target": "${iter}", "value": "" "command": "END", "target": "", "value": "" ``` ### IF <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>IF</td> <td>IF</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>JavaScript expression that returns a boolean result for use in control flow commands</td> <td>A JavaScript expression that returns a boolean result</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">IF command maybe still have some problems. Please check your IF command's target. If your parameters type are string, you need to add <b style="color: red; font-size: 20px">"</b> or <b style="color: red; font-size: 20px">'</b> on both sides of the parameters. ex. <b style="color: red; font-size: 20px">"</b>${myVar}<b style="color: red; font-size: 20px">"</b></td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "if", "target": "${myVar} === 100", "value": "" // sideeX .json "name": "if", "target": "${myVar} === 100", "value": "" Warning Example: // selenium .side "command": "if", "target": "${myVar} === 'b'", "value": "" // sideeX .json // If your ${myVar} is a string, you need to add " or '. // Ex. "${myVar}" or '${myVar}' "name": "if", "target": "'${myVar}' === 'b'", "value": "" ``` ### mouseDown <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseDown</td> <td>mouseDownAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseDown", "target": "id=opacity", "value": "" // sideeX .json "command": "mouseDownAt", "target": "id=opacity", "value": "" ``` ### mouseDownAt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseDownAt</td> <td>mouseDownAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>Specifies the x,y position (e.g., - 10,20) of the mouse event relative to the element found from a locator.</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseDownAt", "target": "id=opacity", "value": "10,20" // sideeX .json "command": "mouseDownAt", "target": "id=opacity", "value": "10,20" ``` ### mouseMoveAt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseDownAt</td> <td>mouseDownAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>Specifies the x,y position (e.g., - 10,20) of the mouse event relative to the element found from a locator.</td> <td>A JSON String containing a series of movements</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseDownAt", "target": "id=canvas", "value": "30,30" "command": "mouseMoveAt", "target": "id=canvas", "value": "90,60" "command": "mouseMoveAt", "target": "id=canvas", "value": "70,20" "command": "mouseMoveAt", "target": "id=canvas", "value": "300,400" "command": "mouseUpAt", "target": "id=canvas", "value": "5,200" // sideeX .json "command": "mouseDownAt", "target": "id=canvas", "value": "30,30" "command": "dragAndDrop", "target": "id=canvas", "value": "{\"StartPoint\":{\"X\":30,\"Y\":30},\"Movements\":[{\"TD\":0,\"OX\":60,\"OY\":30},{\"TD\":0,\"OX\":-20,\"OY\":-40},{\"TD\":0,\"OX\":230,\"OY\":380}]} ``` ### mouseOut <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseOut</td> <td>mouseOut</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseOut", "target": "id=opacity", "value": "" // sideeX .json "command": "mouseOut", "target": "id=opacity", "value": "" ``` ### mouseOver <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseOver</td> <td>mouseOver</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>x,y position of the mouse event relative to the target element.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseOver", "target": "id=opacity", "value": "" // sideeX .json "command": "mouseOver", "target": "id=opacity", "value": "" ``` ### mouseUp <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseUp</td> <td>mouseUpAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseUp", "target": "id=opacity", "value": "" // sideeX .json "command": "mouseUpAt", "target": "id=opacity", "value": "" ``` ### mouseUpAt <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>mouseUpAt</td> <td>mouseUpAt</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>Specifies the x,y position (e.g., - 10,20) of the mouse event relative to the element found from a locator.</td> <td>x,y position of the mouse event relative to the target element. For example: 10,10</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "mouseUpAt", "target": "id=opacity", "value": "10,20" // sideeX .json "command": "mouseUpAt", "target": "id=opacity", "value": "10,20" ``` ### open <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b> command name </b></td> <td >open</td> <td >open</td> </tr> <tr> <td><b>Target</b></td> <td>A URL</td> <td>A URL</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2"> Make sure that base URL is correct. </td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "open", "target": "https://sideex.io/", "value": "" // sideeX .json "name": "open", "target": "https://sideex.io/", "value": "" ``` ### pause <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >pause</td> <td >pause</td> </tr> <tr> <td><b>Target</b></td> <td>The amount of time to wait (in milliseconds)</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The amount of time to wait (in milliseconds)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "pause", "target": "5000", "value": "" // sideeX .json "name": "pasue", "target": "", "value": "5000" ``` ### removeSelection <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b> command name </b></td> <td >removeSelection</td> <td >removeSelection</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator of a multi-select box</td> </tr> <tr> <td><b>Value</b></td> <td>An option locator, typically just an option label (e.g. "John Smith").</td> <td>An option locator of the element to be added. For example: label=Option1.</td> </tr> <tr> <td><b>Description</b></td> <td colspan="2"> Remove a selection from the set of selected options in a multi-select element using an option locator. </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "removeSelection", "target": "id=fruits", "value": "label=StrawBerry" // sideeX .json "name": "removeSelection", "target": "id=fruits", "value": "StrawBerry" ``` ### RUN/INCLUDE <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>run</td> <td>INCLUDE</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The test case to be included while playing.</td> <td>The test case to be included while playing.</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Please make sure that the test case is added to your test suite. Also, remember to open the test suite that have test case you need to run/INCLUDE.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "run", "target": "testCaseName", "value": "" // sideeX .json "name": "INCLUDE", "target": "suiteName.testCaseName", "value": "" ``` ### runScript <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>runScript</td> <td>runScript</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>Some Javascript expressions to be executed.</td> <td>Some Javascript expressions to be executed.</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Note that <b>avoid using alert(), prompt(), and confirm()</b> in the Javascript expression. <b>These three functions will not take effect while playing</b>. Please use console.log() to log messages instead.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "runScript", "target": "console.log('hello world')", "value": "" // sideeX .json "name": "runScript", "target": "console.log('hello world')", "value": "" ``` ### select <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>select</td> <td>select</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>A locator of a drop-down menu</td> <td>A locator of a drop-down menu</td> </tr> <tr> <td><b>Value</b></td> <td>An option locator, typically just an option label.</td> <td>An option locator, typically just an option label.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "select", "target": "id=fruits", "value": "label=Pear" // sideeX .json "name": "select", "target": "id=fruits", "value": "label=Pear" ``` ### selectWindow <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td> selectWindow</td> <td>selectWindow</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>A handle representing a specific page (tab, or window).</td> <td>A handle representing a specific page (tab, or window).</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "selectWindow", "target": "handle=${root}", "value": "" // sideeX .json "name": "selectWindow", "target": "win_ser_local", "value": "" // selenium .side "command": "selectWindow", "target": "handle=${win6199}", "value": "" // sideeX .json "name": "selectWindow", "target": "win_ser_1", "value": "" ``` ### selectFrame <table> <thead> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td>selectFrame</td> <td>selectFrame</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator<br/> index=i (select the i-th frame, i starts from 0)<br/> relative=parent (Select the parent frame)<br/> relative=top (select the top frame) </td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "selectFrame", "target": "index=0", "value": "" // sideeX .json "name": "selectFrame", "target": "index=0", "value": "" ``` ### sendKeys <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>sendKeys</td> <td>sendKeys</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">Note that some website will not accept ${KEY_ENTER} </td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "sendKeys", "target": "id=account", "value": "acc123" // sideeX .json "name": "sendKeys", "target": "id=account", "value": "acc123" ``` ### setSpeed <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>setSpeed</td> <td>setSpeed</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>The amount of time to wait (in milliseconds)</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>1, 2, 3, 4, or 5. 1 is the slowest, and 5 is the fastest.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "setSpeed", "target": "4000", "value": "" // sideeX .json "name": "setSpeed", "target": "", "value": "1" ``` ### setWindowSize <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >setWindowSize</td> <td >setWindowSize</td> </tr> <tr> <td><b>Target</b></td> <td>The width and height of window For example:1080x720</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The width and height of window. For example:1080,720 (corresponding to selenium traget)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">The minimum window size is 500x375, so any width or height less than minimum window size will be automatically set to minimum window size.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "setWindowSize", "target": "1080x720", "value": "" // sideeX .json "name": "setWindowSize", "target": "", "value": "1080x720" Warning Example: // selenium .side "command": "setWindowSize", "target": "400x720", "value": "" // sideeX .json // 400 is automatically set to minimum window size 500 "name": "setWindowSize", "target": "", "value": "500,720" ``` ### store <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td> store</td> <td> store</td> </tr> <tr> <td><b>Target</b></td> <td>A string to store</td> <td>A string to store</td> </tr> <tr> <td><b>Value</b></td> <td>The name of the variable storing the string.</td> <td>The name of the local variable storing the string.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "store", "target": "Bob", "value": "nameVar" // sideeX .json "name": "store", "target": "Bob", "value": "nameVar" ``` ### storeAttribute <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red" colspan="2">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td>storeAttribute</td> <td>storeElement</td> <td>storeEval</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator followed by an @ sign and then the name of the attribute. Example: linkText=Free Download@href</td> <td>An element locator. Example: linkText=Free Download</td> <td>A Javascript expression to be executed. e.g. ${tempVar.href} </td> </tr> <tr> <td><b>Value</b></td> <td>The name of a variable without brackets. Example: varElemAttribute</td> <td>The name of the variable storing the target element. Example: tempVar</td> <td>The name of the variable storing the evaluation result. Example: varElemAttribute</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="3">Note that some 'locator<b>@class</b>' cases will get 'null' from SideeX.</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "storeAttribute", "target": "linkText=Free Download@href", "value": "varElemAttribute" // sideeX .json "name": "storeElement", "target": "linkText=Free Download", "value": "tempVar123" "name": "storeEval", "target": "${tempVar123.href}", "value": "varElemAttribute" ``` ### storeText <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>storeText</td> <td>storeText</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>A string to store</td> <td>A string to store</td> </tr> <tr> <td><b>Value</b></td> <td>The name of the variable storing the string.</td> <td>The name of the local variable storing the string.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "storeText", "target": "id=Button", "value": "buttonText" // sideeX .json "name": "storeText", "target": "id=Button", "value": "buttonText" ``` ### storeTitle <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>storeTitle</td> <td>storeTitle</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>Title of the current page</td> <td>Title of the current page</td> </tr> <tr> <td><b>Value</b></td> <td>Variable name</td> <td>Variable name</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "storeTitle", "target": "SideeX | Auto-First Record-Playback Web Test Automation", "value": "pageTitle" // sideeX .json "name": "storeTitle", "target": "SideeX | Auto-First Record-Playback Web Test Automation", "value": "pageTitle" ``` ### storeValue <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td>storeValue</td> <td>storeValue</td> </tr> <tr> <td><b>Target</b></td> <td>The locator to an input element</td> <td>The locator to an input element</td> </tr> <tr> <td><b>Value</b></td> <td>Variable name.</td> <td>Variable name.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "storeValue", "target": "id=email", "value": "email" // sideeX .json "name": "storeValue", "target": "id=email", "value": "email" ``` ### storeWindowHandle <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>storeWindowHandle</td> <td>selectWindow</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>A handle representing a specific page (tab, or window).</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "storeWindowHandle", "target": "root", "value": "" "command": "selectWindow", "target": "handle=${win6199}", "value": "" // sideeX .json "command": "selectWindow", "target": "win_ser_1", "value": "" ``` ### submit <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >submit</td> <td >submit</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator for the form you want to submit</td> <td>An element locator for the form you want to submit</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2"> submit command may still have some problems. Only the target that contains <b>xpath</b> can be converted. </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "submit", "target": "xpath=//form[@id='form']/input", "value": "" // sideeX .json "command": "submit", "target": "//form[@id='form']", "value": "false" Warning Example: // Any target other from xpath can be converted, but not works ``` ### times <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red" colspan="3">SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td >times</td> <td >store</td> <td >WHILE</td> <td >storeEval</td> </tr> <tr> <td><b>Target</b></td> <td>The number of attempts a times control flow loop will execute the commands within its block. Example: 3</td> <td>A string to store. Example: 0</td> <td>A JavaScript expression that returns a boolean result. Example: ${timesTemp} < 3 </td> <td>A Javascript expression to be executed.</td> </tr> <tr> <td><b>Value</b></td> <td>An optional argument that specifies the maximum number of times a looping control flow command can execute. This protects against infinite loops. The defaults value is set to 1000.</td> <td>The name of the local variable (within a test case) storing the string. Example: timesTemp</td> <td>At this case: N/A</td> <td>At this case: timesTemp</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="4">Note that do not let timesOfLoop bigger than loop limit, if does, we will pick the loop limit be the target, to make sure that SideeX can run successfuly. </td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "times", "target": "3", "value": "" // sideeX .json "name": "store", "target": "0", "value": "timesTemp123" ... "name": "WHILE", "target": "${timesTemp123} < 3", "value": "" "name": "storeEval", "target": "${timesTemp123} + 1 ", "value": "timesTemp123" ``` ### type <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red">SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td >type</td> <td >type</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>An element locator</td> </tr> <tr> <td><b>Value</b></td> <td>The string to be set to the target element.</td> <td>The string to be set to the target element.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">NOTE: XPath locators are not supported. </td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "type", "target": "name=q", "value": "sideex" // sideeX .json "command": "type", "target": "name=q", "value": "sideex" Warning Example: // Any target other from xpath can be converted, but not works ``` ### unCheck <table style="width: 1000px"> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red" colspan="6">SideeX</th> </tr> </thead> <tbody> <tr> <th>command line</th> <td >unCheck</td> <td >storeElement</td> <td >storeEval</td> <td >IF</td> <td >runScript</td> <td >END</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>The locator of the target element. For example: xpath=//[id='foo'].</td> <td>A Javascript expression to be executed. For example: x=2; y=3; z = Math.max(x,y);. The example expression will be evaluated to 3 and the evaluation result will be stored in the variable declared in Value.</td> <td>A JavaScript expression that returns a boolean result</td> <td>Some Javascript expressions to be executed. For example: var a=10; var b=10; console.log(a+b);.</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The name of the variable storing the target element. For example: var_elem.</td> <td>The name of the variable storing the evaluation result. For example: var_result.</td> <td>N/A</td> <td>The amount of time to wait before timeout (in milliseconds). Set -1 for infinite wait</td> <td>N/A</td> </tr> <tr> <td><b>Description</b></td> <td colspan="6"> Uncheck a toggle-button (checkbox/radio). </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="6">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "uncheck", "target": "id=css", "value": "" // sideeX .json "command": "storeElement", "target": "id=css", "value": "id=css" "command": "storeEval", "target": "${id=css.checked}", "value": "id=css" "command": "IF", "target": "${id=css}", "value": "" "command": "runScript", "target": "document.getElementById(\"css\").checked = false", "value": "id=css" "command": "END", "target": "", "value": "" ``` ### verify checked <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td>verifyChecked</td> <td>verifyValue</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>An element locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The expected value of the target element. (Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "verifyChecked", "target": "id=flexCheckChecked", "value": "" // sideeX .json "name": "verifyvalue", "target": "id=flexCheckChecked", "value": "on" ``` ### verifyElementPresent <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>verifyElementPresent</td> <td>verifyPresence</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "verifyElementPresent", "target": "id=Button", "value": "" // sideeX .json "name": "verifyPresence", "target": "id=Button", "value": "" ``` ### verify not checked <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >verifyNotChecked</td> <td >verifyValue</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>An element locator</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>The expected value of the target element. (Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "verifyNotChecked", "target": "id=flexCheckDefault", "value": "" // sideeX .json "name": "verifyvalue", "target": "id=flexCheckDefault", "value": "off" ``` ### verifyText <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >verifyText</td> <td >verifyText</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>An element locator</td> </tr> <tr> <td><b>Value</b></td> <td>An exact string match</td> <td>The expected text of the target element. (Exact matching)</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "verifyText", "target": "id=SIvCob", "value": "Google 提供: English" // sideeX .json "name": "verifyText", "target": "id=SIvCob", "value": "Google 提供: English" ``` ### verifyTitle <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >verifyTitle</td> <td >verifyTitle</td> </tr> <tr> <td><b>Target</b></td> <td>An exact string match</td> <td>The expected string of the title (Exact matching)</td> </tr> <tr> <td><b>Value</b></td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "verifyTitle", "target": "MDN Web Docs", "value": "" // sideeX .json "name": "verifyTitle", "target": "MDN Web Docs", "value": "" ``` ### verifyValue <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <tbody> <tr> <td><b>command name</b></td> <td >verifyValue</td> <td >verifyValue</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator</td> <td>An element locator</td> </tr> <tr> <td><b>Value</b></td> <td>An exact string match</td> <td>The expected value of the target element. (Exact matching)</td> </tr> <tr> <td><b>Description</b></td> <td colspan="2"> Verify the target value in input type with expected value. The test will continue even if the verification fails. Moreover, expected value can be a variable. </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "verifyValue", "target": "name=q", "value": "aaa" // sideeX .json "name": "verifyValue", "target": "name=q", "value": "aaa" ``` ### waitForElementNotPresent <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>waitForElementNotPresent</td> <td >waitForElementNotPresent</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator.</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>The amount of time to wait (in milliseconds).</td> <td>The maximum amount of milliseconds before timeout. For example: 5000 means the execution will continuously check for the element's removal from the DOM tree within 5 seconds. Leave blank for default waiting time (10s).</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "waitForElementNotPresent", "target": "id=image", "value": "5000" // sideeX .json "name": "waitForElementNotPresent", "target": "id=image", "value": "5000" ``` ### waitForElementNotVisible <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td>waitForElementNotVisible</th> <td>waitForElementNotVisible</th> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator.</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>The amount of time to wait (in milliseconds).</td> <td>The maximum amount of milliseconds before timeout. For example: 5000 means the execution will continuously check for the element's invisibility within 5 seconds. Leave blank for default waiting time (10s). </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "waitForElementNotVisible", "target": "id=image", "value": "5000" // sideeX .json "name": "waitForElementNotVisible", "target": "id=image", "value": "5000" ``` ### waitForElementPresent <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td >waitForElementPresent</td> <td >waitForElementPresent</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator.</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>The amount of time to wait (in milliseconds).</td> <td>The maximum amount of milliseconds before timeout. For example: 5000 means the execution will continuously check for the element's presence within 5 seconds. Leave blank for default waiting time (10s).</td> </tr> <tr> <td><b>Description</b></td> <td colspan="2"> Wait for a target element to be present on the page. </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "waitForElementPresent", "target": "id=image", "value": "5000" // sideeX .json "name": "waitForElementPresent", "target": "id=image", "value": "5000" ``` ### waitForElementVisible <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <thead> <tr> <th>command name</th> <td >waitForElementVisible</td> <td >waitForElementVisible</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>An element locator.</td> <td>A locator</td> </tr> <tr> <td><b>Value</b></td> <td>The amount of time to wait (in milliseconds).</td> <td>The maximum amount of milliseconds before timeout. For example: 5000 means the execution will continuously check for the element's visibility within 5 seconds. Leave blank for default waiting time (10s). </td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "waitForElementVisible", "target": "id=image", "value": "5000" // sideeX .json "name": "waitForElementVisible", "target": "id=image", "value": "5000" ``` ### waitForText <table style="width: 1000px"> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red" colspan="6"> SideeX</th> </tr> </thead> <tbody> <tr> <th>command name</th> <td >waitForText</td> <td >storeEval</td> <td >WHILE</td> <td >storeText</td> <td >IF</td> <td >END</td> </tr> <tr> <td><b>Target</b></td> <td>An element locator.</td> <td>A Javascript expression to be executed. For example: x=2; y=3; z = Math.max(x,y);. The example expression will be evaluated to 3 and the evaluation result will be stored in the variable declared in Value.</td> <td>A JavaScript expression that returns a boolean result</td> <td>A locator</td> <td>A JavaScript expression that returns a boolean result</td> <td>N/A</td> </tr> <tr> <td><b>Value</b></td> <td>The text to use</td> <td>The name of the variable storing the evaluation result. For example: var_result.</td> <td>Maximum number of loops. A blank value means no maximum number restriction.</td> <td>The name of the variable storing the text of the target element. For example: var_ele_txt.</td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="6">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "waitForText", "target": "id=text", "value": "Hello world!!!" // sideeX .json "name": "storeEval", "target": "0", "value": "waitVar" "name": "WHILE", "target": "${waitVar} == 0", "value": "" "name": "storeText", "target": "id=text", "value": "id=text" "name": "IF", "target": "\"${id=text}\" == \"Hello World!!!\"", "value": "" "name": "storeEval", "target": "1", "value": "waitVar" "name": "END", "target": "", "value": "" "name": "END", "target": "", "value": "" ``` ### WHILE <table> <thead> <tr> <th></th> <th style="color: blue">Selenium</th> <th style="color: red"> SideeX</th> </tr> </thead> <thead> <tr> <th>command namd</th> <td >WHILE</td> <td >WHILE</td> </tr> </thead> <tbody> <tr> <td><b>Target</b></td> <td>A JavaScript expression that returns a boolean result</td> <td>A JavaScript expression that returns a boolean result</td> </tr> <tr> <td><b>Value</b></td> <td>An optional argument that specifies the maximum number of times a looping control flow command can execute. This protects against infinite loops. The defaults value is set to 1000.</td> <td>Maximum number of loops. A blank value means no maximum number restriction.</td> </tr> <tr> <td><b>Warning</b></td> <td colspan="2">N/A</td> </td> </tr> </tbody> </table> ``` json Example: // selenium .side "command": "WHILE", "target": "${i}<3", "value": "" // sideeX .json "name": "WHILE", "target": "${i}<3", "value": "" With loop limit: // selenium .side "command": "WHILE", "target": "$1==1", "value": "3" // sideeX .json "command": "WHILE", "target": "$1==1", "value": "3" ``` --- ## Reference [Selenium IDE commands](https://www.selenium.dev/selenium-ide/docs/en/api/commands) [SideeX commands](https://hackmd.io/@sideex/book/%2F%40sideex%2Fcommands)