I recently wanted to create a demo video for a product I was pitching. Think “TurboTax of divorce, for poor philadelphians” My intended audience of lawyers are generally indifferent for document automation. I thought a demo showing the generation of the initial filing paperwork might capture their attention. My first demo video was about 5 minutes, and I wanted to target 90 seconds. Preposterously short for generating these documents.
The demo involved asking many simple questions and having software fill out the obtuse forms. While the legal process for divorce in Philadelphia appears straightforward, the process and paperwork are purposefully obstructive. Mostly to punish poor people.
Watching my first take of the demo, I saw that a lot of time was me typing without speaking. When I’m typing, I can’t be pitching, which made the video so awkward. I wanted to automate the filling out of forms; the typing, the clicking, the waiting for things to load. This way, I could focus on the voiceover, and not have them watch me fix a spelling mistake. The voiceover was crucial to get right, as I wanted to use the right lawyer words for what the software was doing. PREsehPEE, INformaPAUPERus, etc. I watched some YouTube videos for pronunciation, and some old lawyer blogs to learn proper names for different things. Gotta sound like I am ingroup.
Searching for ‘sales demo video creation tool’ didn’t turn up anything that looked like what I needed. What I did find were sales enablement solutions, but I couldn’t tell if it would help. I tried to bully an AI into filling out the form, but given that the page was all react components, that wasn’t going to work, oops.
Setting up Cypress
What I wound up doing was using cypress for its end-to-end testing framework. It has an “experimental studio” feature which makes form automation super easy. I added cypress to the project, npm install cypress --save-dev && npx cypress install. Then I enabled the experimental studio, by adding “experimentalStudio: true” to e2e in cypress.config.ts. sed -i '/e2e: {/a \experimentalStudio: true,' cypress.config.ts. Then I set up cypress by running ` npx cypress open`. I also ran the tests against the ‘production’ version of the app, to avoid the hassle of configuring Cypress with loopback interfaces.
Within Cypress Studio, I added a simple spec to load the page, then I enabled experimental features, and this allowed cypress to capture me filling out the form using fun names and addresses, and generate a script with what fields I clicked on, and what I typed. This gave me the initial skeleton of the “scenic roller” that would play while I did the voice-over. Cypress Studio would also run the spec when I modified the file or reloaded the studio. Very handy for redoing takes.
Modifications Necessary
The generated script was a great starting point, but it needed editing in two ways, around being human and complex UI interactions. The first was adding pauses with cy.wait(800);. The pauses were to make it look more like I was filling out the form and allow the viewer to read the form fields. The three autocomplete fields were the hardest part to deal with. They made network requests, they had dynamic fields. I dealt with network requests in two ways. The ideal way is intercepting requests and waiting for them to finish. Then adding a pause to explain the dropdowns.
const url = 'https://api.mapbox.com/search/searchbox/v1/suggest**'
cy.intercept('GET', url).as('getMapbox');
cy.get('input[aria-label="City"]').clear('m');
cy.get('input[aria-label="City"]').type('miam');
cy.wait('@getMapbox').its('response.statusCode').should('eq', 200);
cy.wait(1600);
I could also have mocked the network request and loaded a file locally, but I decided against that because I was lazy.
The other major change to the script was changing what it clicked on. Some of the selectors around the autocomplete were based on dynamic class names, which changed every time. So they had to be changed to click on an autocomplete result based on text. cy.contains('Florida, United States').click({scrollBehavior:false});
The default behavior of cypress is to instantly scroll the target element into view. This is great for testing, but not how apps behave when people actually use them. So I needed to scrollBehavior: false, to the cypress config file, and add manual scrolling with cy.scrollTo(0, 180, {ensureScrollable: false, duration: 700}). I would just guess and check to get the second parameter right.
I also had hit-or-miss luck with the generation of PDFs, which could happen instantly, or take up to 30 seconds. My demo opened with “In 40 seconds we’re going to generate the initial complaint”. Most of the time, it took 40±1 second to fill out the form and have the pdfs generated. A couple times, only when recording, the pdfs would generate in 45 seconds. There were software ways to solve the problem; generate the PDFs out of frame, and then made them visible at the end, fake the pdfs. In the end, I would do another take if the PDFs didn’t load in time.
Making the demo video
The first couple of takes were me filling out the form and running a timer. This sufficed for my brain to fill out the structure of the demo, but more takes were needed to make the demo good.
Watching the first couple of videos, I’d notice things in my background, and go tidy the house to ensure it looked plain. I cleaned off the couch and put large things on their side so they wouldn’t be in the background. I moved flowers from the coffee table to the credenza. Between takes I’d get a glass of water from the kitchen, and despair at how chaotic the house became outside the angles of the camera.
I recorded so many takes that the sun had moved from behind my laptop to behind me. The glare was so bad! I cleaned my laptop screen, and set up some studio lighting. One 4ft LED was enough to overpower the glare, but two would have been even better.
The audio was picking up background noice and my mouse clicks. Since I didn’t have a laver mic, I jury-rigged something silly. I binder clipped a microphone to a carpenters pencil. Which I attached to a gooseneck phone mount. Then I could position the microphone close to my face, while keeping it out of the frame.
Because I wanted the video to be as short as possible, I went with Descript over Loom. Descript generates a transcript of what you say. You cut filler words from the transcript, which cuts the parts of the video where you said it. Beyond eliminating ‘uh’s, I also streamlined phrases like ‘filing for files for divorce filing’ to a concise ‘for divorce filing’. It knows where the boundaries of the words are, and I was able to snip out bits like that to shave off about 30 seconds.
I couldn’t redo parts of the form being filled out, because it would look jerky. But once there wasn’t the animation, I could do extra takes. Once the app wasn’t moving, I didn’t need to be as precise in my dialog. In Philadelphia, they call downtown “Center City”, and so when I flubbed that line said “ok”,,,,, and redid the line.
The final take took about ~4 minutes to record, and I was able to get the demo down to 91 seconds. I sent it out along with my pitch to five people in the space, so we’ll see how they think of it.