Forum Discussion

cst99003's avatar
cst99003
Contributor
7 years ago

How do I get the Additional Info text from a WebAccessibility test into a file?

How do I get the Additional Info text from a WebAccessibility test into a file?

8 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    Could you please describe more about your situation .. 

  • karkadil's avatar
    karkadil
    Valued Contributor

    You need to create event handler for OnLogError event, inside it use LogParams.AdditionalText property to get the text you need.

    You can use aqFile.WriteToTextFile to write the text to the file.

    • cst99003's avatar
      cst99003
      Contributor

      This appear to work as expected but now every ERROR that is triggered hits this EVENT.

       

      How do I get the EVENT to only work with this function?

       

       

      or

       

      Is there a different way to get the "Additional Info" text from the Accessibility Tests?

      • karkadil's avatar
        karkadil
        Valued Contributor
        How do I get the EVENT to only work with this function?

        You can verify the LogParams.MessageText property inside your OnLogError event handler (it is the text from the log). If it contains "Web accessibility" (just double check the string, I'm not sure the text is exact the same), then add the AdditionalInfo to the file. You can use aqString.Find method, for instance, to check the substring presence.