Dashboard > Selenium > alert
Selenium Log In View a printable version of the current page.
alert
Added by Sumith Gamage, last edited by eha on Jan 23, 2007  (view change)
Labels: 
(None)

Description

This extension adds command 'alert' that pops-up a alert message with a given parameter.This helps a lot in script debuging.

Code to add to the user-extensions:

user-extensions.js
Selenium.prototype.doDisplayAlert = function(value, varName) {
    alert(value);
};

Example:

storeEval 1 + 2 result
alert ${result}  

Note:

'echo' is a similar command which allows writing debuging information to log file. But it does not work for Selenium IDE as I saw.

Alert is intrusive I think.. wouldn't it be better to send the message to the LOG window. Something like:

Selenium.prototype.doLogDebug = function(value, varName) {
LOG.debug("DEBUG: " + value);
}

storeEval 1 + 2 result
logDebug ${result}  
Posted by dhwang at Jun 12, 2007 13:13
Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators