Test Step Commands in Selenium IDE for Chrome

Q

What are commonly used test step commands in Selenium IDE for Chrome?

✍: FYIcenter.com

A

Selenium IDE for Chrome supports the following commonly used test step commands:

  • "assert | variable | value" - Compares the variable's value to a given value. The test will stop if the assert fails.
  • "assert element present | locator" - Checks to see if the element specified by the locator exists or not. The test will stop if the assert fails.
  • "assert text | locator | string" - Checks to see if the element specified by the locator contains the given string or not in its text content. The test will stop if the assert fails.
  • "check | locator" - Checks a checkbox or radio button element specified by the locator.
  • "click | locator" - Simulates a mouse click on the element specified by the locator.
  • "double click | locator" - Simulates double mouse click on the element specified by the locator.
  • "drag and drop to object | locator | locator" - Drags the element of the first locator to element of the second locator.
  • "echo | message" - Prints the given message in the log.
  • "edit content | locator | value" - Sets the value of a content-editable element of the locator to the given value.
  • "execute script | script | variable" - Runs the given JavaScript and stores the return value to the given variable.
  • "for each | array | item" - Runs a block of steps for each item in the given array. The step block ends with an "end" step.
  • "if | condition" - Runs a block of steps if the given condition is true. The step block ends with an "end" step.
  • "else if | condition" - Runs a block of steps if the given condition is true and the preceding "if" or "else if" block was not executed. The step block ends with an "end" step.
  • "else" - Runs a block of steps the preceding "if" or "else if" block was not executed. The step block ends with an "end" step.
  • "open | url" - Opens the Web page from the given URL.
  • "pause | period" - Pauses the execution for the given time period in milliseconds.
  • "run | test" - Runs another test from the current test project.
  • "select | locator | option" - Selects an option from dropdown element of the given locator.
  • "send keys | locator | keys" - Simulates keystrokes on the element of the given locator. ${KEY_ENTER} represents the "Enter" key. The element must be visible and active.
  • "set window size | size" - Sets the browser window to the given size in pixels like 1280x800.
  • "store | value | variable" - Stores the given value to the given variable.
  • "store attribute | locator | variable" - Stores the value an element attribute specified by the locator to the given variable. Locator of an attribute is the combination of an element locator and the attribute name like //a@href.
  • "store json | json | variable" - Parses the given JSON string to JavaScript object and assigns to the given variable.
  • "store text | locator | variable" - Stores the text content of the element specified by the locator to the given variable.
  • "store value | locator | variable" - Stores the value of an element supported with "value" attribute and specified by the locator to the given variable.
  • "submit | locator" - Submits a form element specified by the locator.
  • "type | locator | value" - Sets the value of an element supported with "value" attribute and specified by the locator with the given value.
  • "uncheck | locator" - Unchecks a checkbox or radio button element specified by the locator.
  • "verify | variable | value" - Compares the variable's value to a given value.
  • "verify element present | locator" - Checks to see if the element specified by the locator exists or not.
  • "verify text | locator | string" - Checks to see if the element specified by the locator contains the given string or not in its text content.
  • "while | condition | limit" - Repeats a block of steps while the condition is true. But the repetition is limited to the given number. The step block ends with an "end" step.

For complete list of test step commands, visit docs.seleniumhq.org/selenium-ide/docs/en/api/commands/.

 

Use Variable in Selenium IDE for Chrome

Add/Delete Steps in Selenium IDE for Chrome

Selenium IDE - Chrome Extension

⇑⇑ Selenium Tutorials

2019-09-04, 2476🔥, 0💬