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 Priyankav,

    try to define a variable (Using DEFINE at the top) with a value like this "{Apr, 2019}" and then use the variable ${variable}

    it seems like it is taking the comma as a separator of multiple values. 

    Jose

  • Hi Jose,

    I have defined the variable in variables file like below,

    !define DueDate {Apr, 2019}

    The due date  is a text field .I am using the variable like shown below in the wiki page.

    |verify field   |Due Date           |in section| Information|contains|${DueDate }                           |

    Still , it takes the text before comma , PFB the execution log :

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

    Regards,
    Priyanka
Reply
  • Hi Jose,

    I have defined the variable in variables file like below,

    !define DueDate {Apr, 2019}

    The due date  is a text field .I am using the variable like shown below in the wiki page.

    |verify field   |Due Date           |in section| Information|contains|${DueDate }                           |

    Still , it takes the text before comma , PFB the execution log :

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

    Regards,
    Priyanka
Children
No Data