Difference between revisions of "Custom Commands Repository"

From GXtest Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== Go To Object ==
 
== Go To Object ==
'''Tipo''': Evento <br>
+
'''Type''': Event <br>
'''Descripción''': se pasa por parámetro un nombre de un objeto GeneXus y navega a la url de dicho objeto.
+
'''Description''': receives the name of a GeneXus object as a parameter in order to browse to its URL.
  
 
<pre>
 
<pre>
Line 23: Line 23:
  
 
== VerifyUrl ==
 
== VerifyUrl ==
'''Tipo''': Validacion <br>
+
'''Type''': Validation <br>
'''Descripción''': se pasa por parámetro una url y valida que la url del browser coincida con dicha url
+
'''Description''': receives an URL as a parameter and then validates that the browser's URL matches with it.
  
 
<pre>  
 
<pre>  
Line 36: Line 36:
  
 
== VerifyTitle ==
 
== VerifyTitle ==
'''Tipo''': Validacion <br>
+
'''Type''': Validacion <br>
'''Descripción''': se pasa por parámetro un titulo y valida que el titulo del browser coincida con el pasado como parámetro.
+
'''Description''': receives a title as a parameter, and then checks if the browser's title matches with the parameter.
  
 
<pre>  
 
<pre>  

Revision as of 23:09, 14 February 2011

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