Skip to Content

Special checkbox set to X in personas

Hello,

I need to set a checkbox to X in a table inside an order (material view).

I use the command modifiyCell but the value must be a string.

so currently when I pass X, it put X at the right of the box0

I try different cases (true, null,...) and couldn't set the value to On.

Thanks,

Emmanuel.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 16, 2017 at 02:47 PM

    Thomas solution would work.
    However the script recorder does not currently record a nice call for this case but used our fallback recording - something like this:

    session.findById("wnd[0]/usr/tblSAPM_GUITEST_PORTABLETABLECONTROL/chkITAB-COL8[7,3]").executeWebRequest("post", "action", "7", null, null);

    However - if you know that you are interacting with a checkbox you can simply trigger the corresponding checkbox method on the return value from session.findById

    session.findById("wnd[0]/usr/tblSAPM_GUITEST_PORTABLETABLECONTROL/chkITAB-COL8[7,1]").select();

    Pretty cool, right?

    Cheers,
    --
    Sebastian Steinhauer, SAP Design
    SAP Screen Personas
    Product Owner

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Sebastian, it works fine for the select on a check box:

      But what would be the short method to de-select a checkbox?

      I try the .select or .unselect but non works?

      session.findById("wnd[0]/usr/tblSAPM_GUITEST_PORTABLETABLECONTROL/chkITAB-COL8[7,1]").unselect();

      Thanks,

      Emmanuel.

  • May 17, 2017 at 05:47 AM

    In such cases you can try to "record" the action. I guess you need an "executewebrequest" to do this action.

    "Start Recording" > set the checkbox manual > klick another button e.g. save > "stop recording"

    (the checkbox recording works only in combination with other actions)

    Best regards

    Thomas

    Add comment
    10|10000 characters needed characters exceeded

    • for your loop please note that the ID in findById is treated as a string. So you would need to update the string value accordingly:

      for (i=0; i<4; i++){
      session.findById("wnd[0]/usr/tblSAPM_GUITEST_PORTABLETABLECONTROL/chkITAB-COL8[7,"+i+"]").select();
      }

      Cheers,
      --
      Sebastian Steinhauer, SAP Design
      SAP Screen Personas
      Product Owner