Type of Selenium Commands

by thulashi 2015-01-08 12:54:39

Selenium (Selenese ) commands come in following three category

Commands
  • Actions
  • Accessors
  • Assertions

Actions

Actions are commands that change the state of the application like clicking links or buttons, select an option in a or type a character sequence in a given textbox. Actions are available in different flavors. For instance, click(locator)will trigger a click on an element locator but you can also find: clickAndWait(locator)command which will trigger a click and stop the test until the browser has finished loading a new page. clickAt(locator, offset)command that also triggers a click but takes another argument: a X and Y tuple that offset the actual clicking location by X and Y pixels. A combination of the above :clickAtAndWait(locator,offset)that combines the specification of an offset for the click location and waits for a new page to load. Accessors Accessors inspect the state of the application and store values in variables. For instance, storeCookies(variableName)stores all the cookies in use in the current page in the variable variableName. Assertions Assertions come into 3 following types: assert: if assertion fails, test is aborted and marked as failed :assertTitle(pattern)will fail if the title of the page doesnot correspond to the pattern argument. verify: if a verification fails, the test doesnot stop but a trace will be printed in the log. waitFor: these commands pause the test until a condition is satisfied or a timeout is reached.
421
like
0
dislike
0
mail
flag

You must LOGIN to add comments