Questions tagged [testcafe]

TestCafé is a Node.js tool to automate end-to-end testing.

Resources

1417 questions
49
votes
5 answers

Alpine Docker ERROR: Unable to lock database: Permission denied ERROR: Failed to open apk database: Permission denied

So I have used the default docker for testcafe which on docker hub is testcafe/testcafe and I have to run a few testcafe scripts. However, I need the screenshot that fires on error, to be uploaded to somewhere where I can look at it later after…
Vladimir_314159
  • 977
  • 1
  • 6
  • 18
19
votes
3 answers

TestCafe - How to check if a web element exists or does not exist without failing the test?

I'm trying to write a script that needs to adapt it's workflow behavior depending on whether a particular browser object found by CSS selector exists or does not exist. I do not want to use a document.getElementByID method as this is not technically…
Seth Eden
  • 975
  • 2
  • 14
  • 37
12
votes
2 answers

Write current URL to console in TestCafe

I have a variable "currentPage" which I want to set to the current URL on the running page. But to see that the URL is correct I want to print it to the console. What ever I try I keep getting "not defined", "object", ... If I on the other hand use…
ASE
  • 333
  • 2
  • 11
11
votes
1 answer

In which ways is TestCafe better than Selenium?

What problems does TestCafe overcome that justify its adoption over Selenium? Is it worth to port over older test suits to TestCafe?
11
votes
1 answer

Passing arguments to a function using async/await

I'm trying to pass arguments to a function that uses async/await. I've defined my function like so // common.js export const myAsyncFunc = async (t, textA, textB) => { await t .typeText('#input-1', textA) .typeText('#input-2',…
hidace
  • 3,969
  • 6
  • 36
  • 61
10
votes
1 answer

Does TestCafe fit into BDD and cucumber?

I understand TestCafe attempts to replace Webdriver based test frameworks like Selenium. I couldn't find examples of integration with BDD (cucumber) yet.
Albino Cordeiro
  • 1,294
  • 1
  • 14
  • 24
9
votes
1 answer

How to expect url is redirect in TestCafe?

I want to detect URL is redirected to the login page when clicking something that needs to log in first. Is there any way to achieve that?
Knovour
  • 314
  • 3
  • 14
9
votes
2 answers

How to do automated UI testing of devexpress controls?

I want to do automated testing of DevExpress control. I have found some frameworks like guia, NUnitForm etc. but they all are for standard WPF controls. Is there any other framework which can help me to test DevExpress control?
Rudresh Bhatt
  • 1,785
  • 2
  • 22
  • 28
8
votes
1 answer

How much is too much assertions in automation testing?

I am given the task to build a test suit using testcafe and, as I write tests I stumble upon one particular question “how much assertions is too much?”. Basically, after the tests are done, a report is generated. Looking at the report it is not…
8
votes
1 answer

TestCafe - Wait for page load after click on link

I'm using testcafe for e2e testing my current e-commerce project. On the product listing page, I use a Selector to select a product tile and perform a click. After this, the page loads the product detail page and I can continue with testing. The…
8
votes
1 answer

testcafe how to make the selection of the conditional element

I'm having trouble making the selection of the element that conditionally appears on a page. I've tried awaiting but it didn't work. // Gets imported as detailedProductPage export default class Page { constructor () { this.chipItem0 =…
8
votes
1 answer

How to integrate testcafejs in jenkins with different browsers

Currently, I am doing automation UI tests with testcafejs for React project. I would like to run these tests in continuous integration environments such as Jenkins. I already add browserStack plugin to run them locally with different browsers and…
Jing
  • 145
  • 9
7
votes
3 answers

Testcafe command not found when installed through "npm install"

When I installed testcafe with command sudo npm install -g testcafe I was able to use the command "testcafe" in the terminal, running tests like testcafe browser test, but now I formatted my OS and installed it with just npm install with the…
7
votes
2 answers

Command to run two or multiple tests

How to run two or more tests from a single TestCafe CLI command. -t "Test name" accepts only one test name. https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#-t-name---test-name Requirement: Want to run…
7
votes
2 answers

How do i combine Selector with my Utility function?

While writing tests with TestCafe i'm creating utility functions, but there seems to be a problem when using the Selector('') method inside any function. The Selector('') method works fine inside test files and also when importing from another file…
D.Rooij
  • 243
  • 1
  • 11
1
2 3
94 95