Forum Discussion

sunrays123's avatar
sunrays123
Occasional Contributor
6 years ago

How to identify scramble (not readable) text in text file using Python

I need to perform a test case where a text file required to open in Notepad, MS Word or WordPad and to check if it contains teh scrambled texts.

 

Would be great if anyone come up with their suggestions. 

7 Replies

  • Lucian's avatar
    Lucian
    Community Hero

    Hi,

     

    I don't get what is the connection between ReadyApi and Python.

     

    Nevertheless, do you have any indication on what the file format is? Can you provide more info on this like what do you want to achieve?

    • sunrays123's avatar
      sunrays123
      Occasional Contributor

      I would like to check for .cdx file which is a binary file type. It has to open in Notepad, MS Word or WordPad and check if it contains the scrambled texts.

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        Unfortunately if your requirement is to open the file in those programs AND use those programs to check for the text, then that is beyond what you can do even with groovy script.

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    You could potentailly use a groovy script test step to read the contents of the file and see if they contain a certain string.