Difference between revisions of "FillInputBy Command"

From GXtest Wiki
Jump to: navigation, search
(Considerations)
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]]

Revision as of 15:11, 16 April 2015

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 xpath is discouraged, as is the less robust of all options. This is because minor changes in the HTML DOM may break the test case, as the xpath to the control may change and it will no longer be found by GXtest (for example with a new version of GeneXus generator).
  • Based on the previous comments, it is recommended to use in order of preference: id, name, class, and in the case that none of those three are useful, then you may use xpath.