Forum Discussion

anumolu9999's avatar
anumolu9999
Contributor
8 years ago
Solved

How to ignore the Warnings to write to log data

Hello, Can any please help with this. I am getting warning for an action on control. Can we ignore the warning to write to the testlogs Thanks, Anumolu.
  • Well, it sounds like your test "works" in that it is showing that the field only allows 30 characters.  However, "SetText" will ALWAYS return that warning for a text field that only allows a certain length. So, no, there's no way of turning off that warning.

    Try using "Keys" instead of "SetText" in this instance.  That will probably attempt to type all 35 characters but you won't get the warning.  You'll need to have your test do some other detection, then, to determine whether or not the field restrictions worked.

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    I'm not sure I understand the question. Is this during playback? At the end of a run? During test design? What kind of warning are you getting?
    • anumolu9999's avatar
      anumolu9999
      Contributor

      Hello,

       

      I want to test a control which will not accept more than 30 chars. Here I am trying to enter 35 chars, It's throwin a warning as 'value truncated'. Can I ignore/disable test logs which capture this warning temporarly.

       

      Thanks,

      Anumolu.

      • NisHera's avatar
        NisHera
        Valued Contributor

        You are getting a TC log on warning message because you have designed your test in that way.

        So you can ignore whatever you like in your test.

        But you have to purposely build that in to the test.

         

        How? ...

        It depend on how you have written test so far

        And what logs you gets.

         

        if you share psude code of what you have now, we may able to help more.