Tuesday, September 6, 2011

StoreText in Selenium IDE



How user uses StoreText in Selenium IDE


When we want to reuse the data then we can use storetext command in SeleniumIDE.

It will store a value in a variable name then we can use that variable at any time in the same TestCase.

storeText(locator, variableName)

Here locator means location of an element, variableName means we have to declare the variableName.

then whenever we want to use same element then we can reuse that varialbe

Example
storeText(locator, variableName)

type(locator, variableName)

here we are storing the user name in the "ssss" variable
storeText(username, ssss)
here we are using "ssss" variable for enter username in the login page
type(formfield1, ${ssss})