testcafe Questions
3
How can I scroll up and scroll down using TestCafe?
I tried window.scroll(),
window.scrollTo()and throws an error window is not defined.
Labiche asked 30/9, 2019 at 21:23
2
How to block requests from a certain URL using JavaScript? For example, the manual way to do so on chrome will be to open the inspect page, go to network and block from there. But I need to block r...
Expropriate asked 17/1, 2018 at 7:14
8
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 uploade...
Pickaxe asked 6/6, 2018 at 19:2
1
Description:
The bug has been introduced preventing the customer to click on an element that he was would be supposed to click
How?
Steps explanation:
Here is what happens on our payment page appli...
Nameless asked 6/6, 2023 at 9:21
2
Solved
I'm testing functionality that includes redirecting to an external page which I do not control. This page is throwing errors causing the test to fail.
Is there a way to ignore js errors for one s...
Mcdade asked 27/8, 2018 at 0:2
2
Solved
I was trying to use 'faker' with TypeScript in TestCafe Studio. But I'm getting an error saying Cannot find module 'faker' or its corresponding type declarations.(2307)
import * as faker from 'fak...
Subminiature asked 28/1, 2022 at 11:6
4
Solved
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 docu...
Fleta asked 17/11, 2017 at 21:39
2
Solved
Based on various forum discussions, the TestCafe documentation, and trying it out to compare results, I am still not certain which is the correct (or best) way to assert that a page element is visi...
Resor asked 23/7, 2018 at 20:21
2
Solved
When I need to wait for an element to become visible I can simple call the selector as a function like this:
await element.with({ visibilityCheck: true })();
But how can I wait for an element to...
Existentialism asked 3/3, 2019 at 15:31
2
Solved
Is there a way to reload the actual tested page I'm visiting in TestCafe and not the site that TestCafe is running under. I've tried using:
await t.eval(() => location.reload(true));
but that j...
Richardson asked 15/5, 2019 at 20:20
1
Solved
I'm currently using TestCafe for some e2e tests. I've run into the following error
1) - Error in Role initializer -
A JavaScript error occurred on "http://localhost:3000/".
Repeat test...
Nigritude asked 7/10, 2020 at 6:53
2
Solved
I'm trying to get a text from a modal on Chrome. Using the console, I can get the inner text as follows:
document.querySelector('.my-form > a').innerText
// returns http://a-url.com
Now, on m...
Embryotomy asked 21/3, 2019 at 15:30
2
In a testcafe test how can I click on an element that is clearly clickable (with t.debug() I'm able to click on the element) and visible without using ClientFunction, or t.eval -- these "workaround...
Parthena asked 17/4, 2020 at 15:1
3
Solved
For usage as in
test(testName, async (t) => {
const ua = await getUA()
await t.takeScreenshot(
fixtureName +
"/" +
testName +
"/" +
identifyUserAgent(ua) +
"/" +
"scsh_1.png",
)
...
...
Awhile asked 29/8, 2018 at 22:46
2
I am trying to write unit tests for our small but soon to grow library of testcafe business functions - i.e. thos libraries which use the page files, to test any of the non-simple logic.
To this en...
Candis asked 3/7, 2018 at 16:43
2
Solved
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...
Audio asked 23/10, 2018 at 15:18
2
Solved
My test includes a step where the date is set based on the current date (using dayjs()). I need to always get the same, pre-defined date.
dayjs() calls new Date(), so my approach was to mock the g...
Warder asked 3/4, 2019 at 12:28
2
I am using Testcafe (free version) with Java Script. I want to run all my test cases (resides in multiple test scripts in __test__ directory) in a single browser instance (That way 1 time log in) p...
Thirza asked 7/11, 2019 at 22:21
3
Solved
To start my project, I ran vue init webpack my-project, but I excluded E2E tests. Now I changed my mind and do want to include E2E tests. How can I add them to my project?
Note to readers: Tarun L...
1
Solved
Reading the CLI Docs, there doesn't appear to be a way to set the default browser window size. Is there a way to do this so that each test or each test fixture doesn't have to?
I should point out ...
Jeanett asked 23/8, 2019 at 15:55
1
Solved
I'm trying to run testcafe chrome tests/ -e to execute my test but it throws an error saying
"testcafe: The term 'testcafe' is not recognized as the name of a cmdlet, function, script file, or op...
Airwaves asked 26/8, 2019 at 7:34
2
Solved
Summary
We have smoke tests that run shortly after deployment on our web application. Sometimes it takes the login page takes a while for its first load.
Error
- Error in Role initializer -
Failed ...
Conflict asked 18/4, 2019 at 16:15
2
Solved
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-interfa...
Billionaire asked 24/1, 2019 at 16:42
2
Solved
I have a scenario in which multiple elements of the same className appear one after the other (it depends on a server response).
What I'm trying to achieve is passing the test only after 2 elemen...
Unparalleled asked 25/6, 2019 at 21:37
1
Solved
I would like to add a variable, 'example', into a regular expression assertion.
const example = Selector('xyz');
await t.expect(getLocation()).match(/^https:\/\/int-.*.example.com\/en\/example\/-...
Calicle asked 14/6, 2019 at 10:43
1 Next >
© 2022 - 2024 — McMap. All rights reserved.