Ask a Question

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

sunrays123
Occasional Contributor

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 7
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?



If my answer helped please click on the 'Accept as Solution' button.
groovyguy
Champion Level 0

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




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
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.

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.




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
sanj
Super Contributor

What does this post have to do with READY API>

It seems to be in the wrong forum

richie
Community Hero

also. open a binary file in any text editor and thr contents gonna be scrambled anyway i wouldve thought?
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
TanyaYatskovska
SmartBear Alumni (Retired)

Hi Everyone,

 

Thanks for posting a lot of great replies here. @sunrays123, have them answered your question? If they have, please evaluate replies by giving Kudos and marking a solution.

If you still have any questions regarding this topic, please post them here, we will be happy to help!

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: