How to compare the text field in UI in Appian FitNesse scripts?

My testcase in wiki page is failing because the text field compared from UI screen and test value are different in Appian FitNesse scripts

|verify field   |Due Date           |in section|Information|contains|Apr,2019                     |

PFB the execution log for reference.

2019-04-02 19:03:19,021 [main] DEBUG com.appiancorp.ps.automatedtest.tempo.interfaces.TempoReadOnlyField  - READ ONLY FIELD COMPARISON : Field value [Apr, 2019] compared to Test value [Apr]
2019-04-02 19:03:19,021 [main] DEBUG com.appiancorp.ps.automatedtest.common.AppianObject  - STRING COMPARISON: Field value [Apr, 2019] compared to Test value [Apr]

Though I have mentioned Apr,2019 in script , it is considering Apr and hence when compared against Field value from UI --> Apr,2019 , it is failing.

Any inputs in this regard will be useful.

  Discussion posts and replies are publicly visible

Parents
  • Hello Priyanka,

    Sorry about the late reply, but hopefully this can be helpful for future references.

    You can use this fixture method:

    |verify field|FIELD_LABEL or [FIELD_INDEX] or FIELD_LABEL[INDEX]|contains value|VALUE|

    to verify a field contains a value that has a comma.

    In your example, it would be

    |verify field   |Due Date           |in section|Information|contains value|Apr,2019                     |


    Note that we also have a similar method for populate a field with a value that contains a comma,
    |populate field|FIELD_LABEL or [INDEX] or FIELD_LABEL[INDEX]|with value|VALUE|

    These methods are all documented in the cheatsheet as well.

    Thank you for using FitNesse for Appian.


Reply
  • Hello Priyanka,

    Sorry about the late reply, but hopefully this can be helpful for future references.

    You can use this fixture method:

    |verify field|FIELD_LABEL or [FIELD_INDEX] or FIELD_LABEL[INDEX]|contains value|VALUE|

    to verify a field contains a value that has a comma.

    In your example, it would be

    |verify field   |Due Date           |in section|Information|contains value|Apr,2019                     |


    Note that we also have a similar method for populate a field with a value that contains a comma,
    |populate field|FIELD_LABEL or [INDEX] or FIELD_LABEL[INDEX]|with value|VALUE|

    These methods are all documented in the cheatsheet as well.

    Thank you for using FitNesse for Appian.


Children
No Data