Custom Commands Repository

From GXtest Wiki
Revision as of 18:45, 10 January 2011 by Abstracta (Talk | contribs)

Jump to: navigation, search


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+")";
}