Fitnesse : How to select the Checkbox inside grid ?

Hi All,

I want to select checkbox which is present inside grid . I tried using below methods but it didn't help :

1) | click on grid | GRID_NAME or GRID_NAME[INDEX] or [GRID_INDEX] | column | COLUMN_NAME or [COLUMN_INDEX] | row | [ROW_INDEX] |

2) | select grid | GRID_NAME or [GRID_INDEX] or GRID_NAME[INDEX] | row | [ROW_INDEX] |

Below is the sample screen. Please help and let me know your solutions .

 

Thanks,

Anu

  Discussion posts and replies are publicly visible

Parents
  • Here is a simple recipe I wrote that you can copy and paste into the interface designer.

    load(
      local!data: {
        {name: "Chairs", flag: false},
        {name: "Laptops", flag: true},
        {name: "Desks", flag: false}
      },
      a!gridLayout(
        instructions: local!data,
        headerCells: {
          a!gridLayoutHeaderCell(label: "Name"),
          a!gridLayoutHeaderCell(label: "Flag")
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(
            width: "DISTRIBUTE"
          ),
          a!gridLayoutColumnConfig(
            width: "ICON"
          )
        },
        rows: a!forEach(local!data,
          a!gridRowLayout(
            contents: {
              a!textField(
                value: fv!item.name,
                readOnly: true
              ),
              a!checkBoxField(
                choiceLabels: {""},
                choiceValues: {true},
                value: if(fv!item.flag, {true}, null),
                saveInto: a!save(fv!item.flag, if(save!value, true, false)),
    align: "CENTER" ) } ) ) ) )
Reply
  • Here is a simple recipe I wrote that you can copy and paste into the interface designer.

    load(
      local!data: {
        {name: "Chairs", flag: false},
        {name: "Laptops", flag: true},
        {name: "Desks", flag: false}
      },
      a!gridLayout(
        instructions: local!data,
        headerCells: {
          a!gridLayoutHeaderCell(label: "Name"),
          a!gridLayoutHeaderCell(label: "Flag")
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(
            width: "DISTRIBUTE"
          ),
          a!gridLayoutColumnConfig(
            width: "ICON"
          )
        },
        rows: a!forEach(local!data,
          a!gridRowLayout(
            contents: {
              a!textField(
                value: fv!item.name,
                readOnly: true
              ),
              a!checkBoxField(
                choiceLabels: {""},
                choiceValues: {true},
                value: if(fv!item.flag, {true}, null),
                saveInto: a!save(fv!item.flag, if(save!value, true, false)),
    align: "CENTER" ) } ) ) ) )
Children
No Data