Questions tagged [testcafe]

TestCafe and TestCafe Studio - end-to-end testing, simplified. Questions from users of the open-source TestCafe and TestCafe Studio community edition subscribers.

Resources

1850 questions
0
votes
1 answer

How to read a columns data into a variable and share it in all test functions (single spec), in Test Cafe

I've read multiple posts on here about reading in table data, however, every post is how to read and use that data within a single test function. How do I read a table in, and use it in any test function within a test spec? If I write this into a…
Daniel
  • 3
  • 4
0
votes
1 answer

TestCafe: Page Models for Single Page Applications

I have been struggling to figure out the best way to represent a single page application within TestCafe, and was wondering if anyone out there could help me? Currently I am structuring it like the following (fake page names of course). I have…
0
votes
1 answer

any official support for testcafe-cucumber Integration?

I am doing small proof of concept where checking testcafe-cucumber Integration. I have refereed couple of testcafe-cucumber integration projects on gitHub for the…
0
votes
1 answer

In Testcafe can we declare a variable in a testcase and use the same as an expected value for an assertion?

I want to store an UI element as a variable in testcase and want to use the varible as an expected value for an assertion later to match it with a similar text. But couldn't figure out a way.
0
votes
1 answer

'Global' parent selector: limiting scope of any selector to a certain parent

Im looking for an option to limit the scope of every selector to a parent selector. Am trying to abstract away a lot of the (internal implementation) details of our WebApp for the testers that will actually write the UI tests. If our application…
Paul
  • 335
  • 1
  • 3
  • 16
0
votes
2 answers

Testcafe fixtureName and testname uniqueness

We use testcafe for e2e tests and currently we are fixing flaky tests. During this we noticed that we use duplicated names for some fixtures and tests. Should we use unique names for fixtureName and testName or duplicated names are allowed?
0
votes
1 answer

electron ENOENT error when running in gitlab CI pipeline

I'm running a job in gitlab CI and getting the following error when executing testcafe command. The tests do pass locally. Error spawn /builds/testcafe-reporter/node_modules/nightmare/node_modules/electron/dist/electron ENOENT at…
David Faizulaev
  • 4,651
  • 21
  • 74
  • 124
0
votes
2 answers

Need to evaluate the class of an element and loop through code while it's not true

I'm having to automate a script that has a 'tear down' method to make sure the state of the page is where it was before we interacted with it. I am having issues figuring out exactly how to do this. My current idea is to perform a while loop when a…
0
votes
2 answers

How to handle that browser connection couldnt be established with Testcafe

Im running my TestCafe tests on a Azure DevOps agent. I'm experiencing sporadic issue of browser connectivity: 1 of 2 browser connections have not been established: - firefox:userProfile Hints: - Increase the value of the "browserInitTimeout"…
0
votes
2 answers

Can I execute a function in response to a failed assert in TestCafe?

We are using Testcafe for our regression tests and I would like to enhance the test logging of failed asserts by adding any messages from the browser console to the output. According to the Testcafe documentation, this code will print "The test has…
Holger
  • 23
  • 3
0
votes
1 answer

What is the maximum concurrency TestCafe can support

We are trying TestCafe with 50 concurrency and TestCafe randomly with "Cannot read property 'stackFrames' of undefined" Same code base when we run with 20 threads works fine without any issues. Is there any upper limit on number of threads in…
0
votes
2 answers

Is there a Testcafe proxy workaround for AAD B2C authentication using MSAL 2.0?

We had been using TestCafe for automated testing against our SPA from 2018 - early 2020 where we started to run into issues with MSAL 1.0 and the blocking of 3rd party cookies. We recently upgraded to our authentication packages to MSAL 2.0 in our…
0
votes
0 answers

Does Prettier have a way to specifically ignore certain lines of code in a file?

We are using TestCafe for our E2E testing purposes and wanted to implement a formatter so all contributors push the same style code up. I have Prettier up and running and have some config rules in place, but we are seeing some wonkiness that I think…
0
votes
1 answer

Testcafe Role constructor does not execute authentication function

My Testcafe tests cannot run at the moment because my defined roles wont initialize. I have a function where I wanted to retrieve data during the login process. But it seems like the entire login logic is skipped in the Role constructor. I have a…
0
votes
1 answer

Is it possible to add iPad parameter "deviceOrientation" in testcafe-browser-provider-saucelabs?

My team follows this example for our browser configuration on Saucelabs: https://github.com/saucelabs/testcafe-browser-provider-ios To be exact, this is what we have in our code: "test-ipad": "testcafe 'saucelabs:iPad Pro (9.7-inch) Simulator@13.3'…