Repositorio de Custom Commands

From GXtest Wiki
Revision as of 15:42, 19 February 2013 by Fbaptista (Talk | contribs)

Jump to: navigation, search

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;
}