Difference between revisions of "FillInputBy Command"

From GXtest Wiki
Jump to: navigation, search
(FillInputBy)
Line 1: Line 1:
 +
{{Idiomas|Comando FillInputBy|FillInputBy Command | FillInputBy コマンド}}
 +
[[category:GXtest Commands]]
 +
 
{{Idiomas|Comando FillInputBy|FillInputBy Command | FillInputBy コマンド}}
 
{{Idiomas|Comando FillInputBy|FillInputBy Command | FillInputBy コマンド}}
 
[[category:GXtest Commands]]
 
[[category:GXtest Commands]]
  
 
== FillInputBy ==
 
== FillInputBy ==
 +
This command writes a value inside an editable control. It works like the FillInput command, but it helps us when the control we are trying to edit is outside the KB, or it's a non-standard GeneXus control (for example a user-control, a javascript-generated field, etc.)
 +
 +
 +
=== Command parameters ===
 +
* Target input: a search criteria for finding the control in the page (for example "id=edit1")
 +
* Value: The value that will be written in the control
 +
 +
 +
=== Search criteria ===
 +
The identification criteria for finding a control in the page are:
 +
* id: An unique identification for the control, it matches the id attribute of the HTML elements. Example: id=edit1
 +
* name: Name of the control, it matches the name attribute of the HTML elements. Example: name=ClientName
 +
* class: Control class, it matches the class attribute of the HTML elements. Example: class=BlackEditBoxes
 +
* xpath: Xpath that identifies the control inside the HTML DOM structure.
 +
  
Documentation is under construction
+
=== Considerations ===
 +
* Name and class searches may have multiple matches, because they do not uniquely identify an element in the HTML. In the case of multiple matches, the first match will be used.
 +
* The use of
 +
La búsqueda utilizando xpath es la menos recomendada de las 4, ya que pueden "romperse" con cambios en la interfaz de la aplicación (quizás incluso por cambios no visibles, como una nueva versión del generador GeneXus), debido a cambios en el HTML o DOM generado y la ubicación del control.
 +
* Debido a los dos puntos anteriores, se recomienda utilizar en el siguiente orden de preferencia los criterios de identificación: id, name, class, y si ninguno de los tres anteriores pudiera ser utilizado, entonces usar xpath.

Revision as of 15:43, 14 April 2015

Spanish.gif
English.gif
Japan.gif
Spanish.gif
English.gif
Japan.gif

Contents

FillInputBy

This command writes a value inside an editable control. It works like the FillInput command, but it helps us when the control we are trying to edit is outside the KB, or it's a non-standard GeneXus control (for example a user-control, a javascript-generated field, etc.)


Command parameters

  • Target input: a search criteria for finding the control in the page (for example "id=edit1")
  • Value: The value that will be written in the control


Search criteria

The identification criteria for finding a control in the page are:

  • id: An unique identification for the control, it matches the id attribute of the HTML elements. Example: id=edit1
  • name: Name of the control, it matches the name attribute of the HTML elements. Example: name=ClientName
  • class: Control class, it matches the class attribute of the HTML elements. Example: class=BlackEditBoxes
  • xpath: Xpath that identifies the control inside the HTML DOM structure.


Considerations

  • Name and class searches may have multiple matches, because they do not uniquely identify an element in the HTML. In the case of multiple matches, the first match will be used.
  • The use of

La búsqueda utilizando xpath es la menos recomendada de las 4, ya que pueden "romperse" con cambios en la interfaz de la aplicación (quizás incluso por cambios no visibles, como una nueva versión del generador GeneXus), debido a cambios en el HTML o DOM generado y la ubicación del control.

  • Debido a los dos puntos anteriores, se recomienda utilizar en el siguiente orden de preferencia los criterios de identificación: id, name, class, y si ninguno de los tres anteriores pudiera ser utilizado, entonces usar xpath.