Tech Tips

Python Faker with the Fake App (Mac OS)

Fake App is a fantastic way to automate form filling, especially for folks without coding skills. The click-and-drag to target an element lets you quickly build your macros.

Python Faker is a utility library that I leverage with tools like Fake App, Alfred, Keyboard Maestro, etc. to generate realistic dummy text. This blog post shows one method of how to get Python Faker data into Fake App; I imagine there might be a simpler way but this works well and is fairly intuitive.

The idea is to just write the Faker output to a file and read that file into a variable for use in Faker. With this method you could even store variables for re-use. For example, if you had three fields: First Name, Last Name, and Full Name, you could easily store the first and last names to separate files and use both values for the Full Name field. With the power of Faker your dummy text options are extensive; you can generate very realistic values for your form filling. See all of the “providers” here.

This example below took just minutes to setup (and it was the first time I’ve used this technique).

You can reuse the same file over and over (rewriting the value as you go) and/or you could generate files for each field up front, and then call them in.


Result


Script

 

Things look a bit cleaner if we group and collapse everything that we already have working:

 

Leave a Reply

Your email address will not be published.