Error when using recordTest() in shinytest

Hi, I've been trying to use recordTest function in shinytest package. There's an error every single time:

Error in app_path(app) :
. must be a directory containing app.R, server.R, or index.Rmd; or path to a .Rmd file (including the filename).

Is there any way to fix this? My path looks like this "/Users/name/Downloads/App-Name/sample_app.R"