UPDATE May 14, 2015 - Target and Value have been swapped. If you have test suites using the old version you'll have to swap your targets and values after updating.
- Install Selenium IDE in Firefox
- Open Selenium in Firefox by clicking Tools > Selenium IDE
- With the Selenium IDE window open, click Options > Options
- Add the full path to lipsumtext.js in the Selenium Core extensions field (you can use multiple extensions separated with commas)
- Test
To use this extension you'll be creating a command that will set a variable. You can then use this variable later by other commands.
You can create a new command using either of these methods:
- right-click in the white table box within the Selenium IDE main window and choose Insert New Command.
- use the Selenium main menu: click Edit > Insert New Command
Here are some examples of setting a variable:
Command | Target | Value | (result) |
lipsumText | myvarx | 20 words | 20 words; entire string starts with capital letter and ends with period; string may contain additional punctuation |
lipsumText | myvarx | 1 paragraph | 1 paragraph of 15 to 300 words; paragraph starts with capital letter and ends with period; paragraph may contain additional punctuation |
lipsumText | myvarx | 3 paragraphs | 3 paragraphs of 15 to 300 words each; each paragraph starts with capital letter and ends with period; paragraphs may contain additional punctuation |
lipsumText | myvarx | 5 paragraphs|htmltags | 5 paragraphs of 15 to 300 words each; paragraphs are wrapped in <p> tags; each paragraph starts with capital letter and ends with period; paragraphs may contain additional punctuation |
lipsumText | myvarx | 5 words|wordcaps | 5 words; each word capitalized; may contain additional punctuation |
lipsumText | myvarx | 10 words|wordcaps|nomarks | 10 words; each word capitalized; will not contain any punctuation |
Here is an example of using the variable we created above to insert the lorem ipsum text into a text field:
Command | Target | Value |
type | id=my-edit-field-value | ${myvarx} |
- None (see git log for latest improvements)