Difference between revisions of "Repositorio de Custom Commands"
From GXtest Wiki
(New page: == Go To Object == '''Tipo''': Evento <br> '''Descripción''': se pasa por parámetro un nombre de un objeto GeneXus y navega a la url de dicho objeto. <pre> if (currentLanguage=="java")...) |
|||
| 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''': Acción <br> | ||
| + | '''Descripción''': Hace click en el paginado automático de una grid de Evolution, se pasa por parámetro "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:42, 19 February 2013
Contents |
Go To Object
Tipo: Evento
Descripción: se pasa por parámetro un nombre de un objeto GeneXus y navega a la url de dicho objeto.
if (currentLanguage=="java")
{
window.location=paramJS;
}
else if (currentLanguage=="net")
{
window.location=paramJS+".aspx";
}
else
{
window.alert("language: " + currentLanguage);
}
result = "OK";
return result;
VerifyUrl
Tipo: Validacion
Descripción: se pasa por parámetro una url y valida que la url del browser coincida con dicha url
var url=window.document.location.href;
if(url.indexOf(paramJS)==-1)
result = "OK";
else
result="falla";
VerifyTitle
Tipo: Validacion
Descripción: se pasa por parámetro un titulo y valida que el titulo del browser coincida con el pasado como parámetro.
if (document.location.href.indexOf(paramJS)!=-1)
{
result = "OK";
}
else
{
result= "The string ("+paramJS+") is not in the url ("+document.location.href+")";
}
ClickGridButtons
Tipo: Acción
Descripción: Hace click en el paginado automático de una grid de Evolution, se pasa por parámetro "First", "Previous", "Next" o "Last".
function CustomCommand (paramJS, currentGXVersion, currentLanguage)
{
windows.document.getElementsByClassName("PagingButtons" + paramJS)[0].click();
result = "OK";
return result;
}