Difference between revisions of "Custom Commands Repository"
From GXtest Wiki
| Line 49: | Line 49: | ||
{ | { | ||
result= "The string ("+paramJS+") is not in the url ("+document.location.href+")"; | result= "The string ("+paramJS+") is not in the url ("+document.location.href+")"; | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | |||
| + | == ClickGridButtons == | ||
| + | '''Tipo''': Action <br> | ||
| + | '''Descripción''': Clicks on grid's buttons - "First", "Previous", "Next" o "Last". | ||
| + | |||
| + | <pre> | ||
| + | |||
| + | function CustomCommand (paramJS, currentGXVersion, currentLanguage) | ||
| + | { | ||
| + | |||
| + | windows.document.getElementsByClassName("PagingButtons" + paramJS)[0].click(); | ||
| + | |||
| + | result = "OK"; | ||
| + | return result; | ||
} | } | ||
</pre> | </pre> | ||
Revision as of 15:44, 19 February 2013
Contents |
Go To Object
Type: Event
Description: receives the name of a GeneXus object as a parameter in order to browse to its URL.
if (currentLanguage=="java")
{
window.location=paramJS;
}
else if (currentLanguage=="net")
{
window.location=paramJS+".aspx";
}
else
{
window.alert("language: " + currentLanguage);
}
result = "OK";
return result;
VerifyUrl
Type: Validation
Description: receives an URL as a parameter and then validates that the browser's URL matches with it.
var url=window.document.location.href;
if(url.indexOf(paramJS)==-1)
result = "OK";
else
result="falla";
VerifyTitle
Type: Validacion
Description: receives a title as a parameter, and then checks if the browser's title matches with the parameter.
if (document.location.href.indexOf(paramJS)!=-1)
{
result = "OK";
}
else
{
result= "The string ("+paramJS+") is not in the url ("+document.location.href+")";
}
ClickGridButtons
Tipo: Action
Descripción: Clicks on grid's buttons - "First", "Previous", "Next" o "Last".
function CustomCommand (paramJS, currentGXVersion, currentLanguage)
{
windows.document.getElementsByClassName("PagingButtons" + paramJS)[0].click();
result = "OK";
return result;
}