[docs] add documentation for API usage of userVariables #7896
Labels
AREA: docs
An issue related to the product documentation.
TYPE: enhancement
The accepted proposal for future implementation.
What is your Scenario?
I was looking for a way to inject
userVariables
(introduced in v1.16.0) when I start TestCafe via the js API.The only documented way to use them is via a configuration file.
I did not find any documentation about JS API usage, but this comment by @Artem-Babich in #2431:
This is exactly what I was looking for.
It works, although it is a little awkward because all other configuration goes to the runner (and therefore
RunOptions
).What are you suggesting?
For API / TestCafe API / Global / createTestCafe() # options
For API / Configuration File # User Variables
For /ts-defs-src/runner-api/configuration.d.ts
userVariables: UserVariables
What alternatives have you considered?
I can add a file like
testcafe.global.tc.ts
:Additional context
No response
The text was updated successfully, but these errors were encountered: