Commonly used Selenium Commands
1. Action Commands
Open(Locator) – This Command will open the specified
click(Locator) – This Command will Click at specified target
check(Locator) – Toggles the checked value of a checkbox
type(Locator, value) –Sends text input to an element
select (Locator, value)– This will select the specified item in a list
Note: most action commands in Selenium IDE also have a duplicate command with the AndWait suffix. When these are used the action is performed and a page load is expected and the command will not complete until the page has loaded or the timeout is reached.
2. Store, Check, and Wait
· store(expression, variableName) – Allows you to temporarily store a value
· verify(pattern) – performs verification and skip execution, if fails.
· assert(pattern) – performs verification and stop execution, if fails.
· waitFor(pattern) – Waits until the value matches the specified value or the timeout.
Note: These Commands are heart of Selenium ,as these deal with verifiacation and validation part.
3. Triggering Events
· mouseDown / mouseUp(locator) – This simulates clicking the left mouse button.
· keyDown / keyUp(locator, keySequence) – Simulate the user pressing a key or releasing a key.
· fireEvent(locator, eventName) – If all else fails you can fire the JavaScript event directly.
No comments:
Post a Comment