Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the following table as a reference when determining whether a certain Selenium IDE command is compatible with your ASM Scenario.

Actions

Keyboard &  Mouse interaction

Verification and Assertion

Waits

Scenario Flow

JS Execution

Stored Variables

Custom (ASM Specific) Commands

open

keyDown

assertElementPresent

waitForVisible

gotoIf

fireEvent

storeTitle

setPageBreak

clickAndWait

keyDownAndWait

assertTitle

waitForText

goto

runScript

storeXpathCount

insertPageBreak

clickAtAndWait

keyUp

assertLocation

waitForValue

label

getEval

storeCssCount

takeScreenshot

click

clickAndNotWait

keyUpAndWait

assertVisible

waitForAttribute

close

runScriptAndWait

storeValue

startRecording

clickAt

click

keyPress

assertElementNotPresent

waitForNotText

pause

executeScript

storeText

clearRecording

type

clickAt

keyPressAndWait

assertNotVisible

waitForNotValue

setSpeed

storeLocation

stopRecording

sendKeys

doubleClick

mouseOver

assertAttribute

waitForNotAttribute

setTimeout

storeExpression

getDictionary

typeKeys

doubleClickAt

assertNotAttribute

waitForTextPresent

waitForText

echo

storeEval

select

doubleClickAndWait

assertValue

waitForTextNotPresent

waitForTextPresent

storeAttribute

selectAndWait

doubleClickAtAndWait

assertNotValue

waitForElementPresent

waitForTextNotPresent

storeElementPresent

selectFrame

clickInvisible

assertText

waitForEditable

waitForElementPresent

store

selectWindow

clickInvisibleAndWait

assertTextNotPresent

waitForEditable

type

assertTextPresent

waitForElementNotPresent

submit

sendKeys

assertTextPresent

assertExpression

waitForNotVisible

assertExpression

typeKeys

assertNextConfirmation

waitForTitle

select

assertNextConfirmation

assertNextAlert

waitForLocation

selectAndWait

assertNextAlert

assertAlert

waitForAlert

selectFrame

assertAlert

assertConfirmation

waitForConfirmation

assertConfirmation

selectWindow

assertEval

waitForPageToLoad

submit

verifyTitle

createCookie

verifyLocation

deleteCookie

verifyElementPresent

quit

verifyVisible

_chromeDebugExec

verifyElementNotPresent

verifyNotVisible

verifyAttribute

verifyNotAttribute

verifyValue

verifyNotValue

verifyText

verifyTextNotPresent

verifyTextPresent

verifyExpression

Custom ASM Commands

ASM supports several commands which are not utilized in native Selenium IDE: insertPageBreak, takeScreenshot, and getDictionary.

...

When using sendKeys in Selenium IDE, the key codes ${KEY_ENTER}, ${KEY_SHIFT}, and ${KEY_LEFT} are not valid commands within Selenium IDE. Use keyPress or keyPressAndWait (if the keystroke triggers a new page load) instead. When entering a keystroke, use the respective ASCII values for the key you want to be pressed. For example, if you want to press Enter within an application, use the command keyPress and the value \13.

Command

Target

Value

keyPressAndWait

id=gh-ac

\13

JavaScript Execution

Selenium WebDriver’s JavascriptExecutor will wrap all JavaScript and evaluate it as an anonymous expression. Therefore, the “return” keyword must be used when executing JavaScript within the “Target” field in an ASM scenario. For example, the command browserbot.getCurrentWindow().document.title in Selenium becomes return document.title; in an ASM Scenario.

If your Selenium IDE looks like the following:

Command

Target

Value

assertEval

${stored_var} > 0

true

Add a “return” keyword to the target so it looks like the following:

Command

Target

Value

assertEval

return ${stored_var} > 0

true

The following commands result in javascript evaluation or expect a javascript snippet as an argument. Therefore, they also require the use of “return”:

...

It is currently not possible to change the value of a variable from within a JavaScript snippet. This Selenium IDE code will change the value of $counter:

Command

Target

Value

 storeEval

return (storedVars'counter' + 1)

counter

The following command will not change the value of $counter:

Command

Target

Value

 runScript

storedVars'counter' += 1;

counterTwo

...

Info

Knowing how to increment a value is useful when running through a loop in an ASM script!

...