Fitnesse :- How to validate instructions or text inside section ?

I All,

I have a form with sections below . I am trying to validate instructions given "Please verify...." and "Selecting Upload function........" . These fields are paragraph/richtext .

Please can somebody help me with the suggestions .

Thanks in advance.

 

Data Submission Method for :

 

Please verify the method you would like to use in providing the . Please contact  if this list is inaccurate.

 
column, sorted ascending, activate to sort descending

FUNQA

 

Selecting 'Upload' option will allow you to upload a single file for one or multiple tickers using a provided template. A separate review and submit task will then be generated for each ticker in order to edit, verify and submit validated data. If ticker data is not included in the upload file, a Complete Task will be created and data will not be prepopulated.Selecting 'Manual Entry' option will generate a separate data entry, review and submit task for each ticker. You will still have the option to upload data using the provided template.

  Discussion posts and replies are publicly visible

Parents
  • Hi Anu,

    If these are paragraph/rich text fields with the text that you are trying to verify as the label, the following method should work:

    | verify field | Please verify the method you would like to use in providing the . Please contact  if this list is inaccurate. | is present |

    I'd suggest storing the label text that you want to check for in variables somewhere and checking against those, as that should make it easier to alter the testing script if the text is updated.

    Thanks,

    Lucas

Reply
  • Hi Anu,

    If these are paragraph/rich text fields with the text that you are trying to verify as the label, the following method should work:

    | verify field | Please verify the method you would like to use in providing the . Please contact  if this list is inaccurate. | is present |

    I'd suggest storing the label text that you want to check for in variables somewhere and checking against those, as that should make it easier to alter the testing script if the text is updated.

    Thanks,

    Lucas

Children
  • Hi lucas,

    Thanks for your suggestion.

    As per your suggestion I am using following method but it says "Timeout period reached". Am I missing something ? Please advise.

    Also, I have stored these text in variable and then checking .

    |verify field Timeout period reached: Wait for Field - Please verify the method you would like to use in providing the fund characteristics data. Please contact if this list is inaccurate.| Please verify the method you would like to use in providing the characteristics data. Please contact if this list is inaccurate. |is present |

    |verify field Timeout period reached: Wait for Field - Selecting 'Upload' option will allow you to upload a single file for one or multiple tickers using a provided template. A separate review and submit task will then be generated for each ticker in order to edit, verify and submit validated data. If data is not included in the upload file, a Complete Task will be created and data will not be prepopulated.Selecting 'Manual Entry' option will generate a separate data entry, review and submit task for each ticker. You will still have the option to upload data using the provided template. |Selecting 'Upload' option will allow you to upload a single file for one or multiple tickers using a provided template. A separate review and submit task will then be generated for each ticker in order to edit, verify and submit validated data. If ticker data is not included in the upload file, a Complete Task will be created and data will not be prepopulated.Selecting 'Manual Entry' option will generate a separate data entry, review and submit task for each ticker. You will still have the option to upload data using the provided template.| is present |

  • Hi Anu,
    What is your value in 'set timeout seconds to ' ? Matching that length of text can take some time.
    Try to use 60 or even 90
  • Hi magnus,

    I tried giving 90 or more but still it says "Timeout period reached" :( . Just checked the code to confirm its rich text field only . Is there any other option ?
     
    a!richTextDisplayField(
    value: {
    a!richTextItem(text: "Please verify the method you would like to use in providing the fund characteristics data. Please contact if this list is inaccurate.", style: "EMPHASIS")
    }
    )
     
     
     
    Thanks in advance !!

  • Hi Anu,
    Try to use
    | verify field | FIELD_LABEL or [FIELD_INDEX] or FIELD_LABEL[INDEX] | contains | VALUES() | or
    | verify field | FIELD_LABEL or [FIELD_INDEX] | in section | SECTION_NAME | contains | VALUE(S) |
    It is where in the structure the text are.

    I guess you could try something like:
    | verify field | [1] | contains | Please verify the method you would like to use in providing the . Please contact if this list is inaccurate. |

    I hope this helps.
  • Thank you so much magnus . It works perfectly :)
  • Hi Anu, you are welcome.

    I didn't read you first post properly.
    These text fields are a pain to find correctly, my learning is to use index even if that make the script hard to read.
  • No problem Mangnus.

    Your learning is helping me as well :) Thanks