In TestCafe Studio, how can I import/reference selectors/functions/custom scripts defined in one fixture into another?

Viewed 71

If I define a selector or function in one test, can I access it in another test or a test in another file/fixture? Similarly, is there a way to implement page models and for tests to use selectors defined within page?

1 Answers

TestCafe Studio does not allow sharing selectors and functions defined via the "Define Element Selector" and "Define Function" actions in codeless testing. However, you can import selectors using the Run TestCafe Script action.

For example:

enter image description here

Related