How to setup different lambda-hooks with JS-TestCafe?

How can I setup different lambda-hooks with JS-TestCafe?

Hello Macy,

There are different lambda hooks that you can use depending on your requirement. For example, let’s say you want to list down the file in download directory. To do that, you can add the hooks below on your script:

lambda-file-list - print driver.execute_script("lambda-file-list={match string with filename}");
ie:print driver.execute_script("lambda-file-list=sample");Response: List of files in downloads dir starting with sample

To know more Lambda hooks and it's functions, https://www.lambdatest.com/support/docs/lambda-hooks//