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.
1,851
questions
0
votes
0
answers
4
views
Introducing URL encoding / obfuscation in testcafe-hammerhead url-rewrite proxy
First of all thanks for the amazing work behind testcafe-hammerhead, I'm creating a question here because I feel like this might not belong on the github issues tracker, maybe I could make an argument ...
1
vote
1
answer
24
views
The action target is located outside the layout viewport testcafe
I am using testcafe for web testing. The frontend application is written in reactjs with material ui design components.
Following is the code:
import { Selector, ClientFunction, } from 'testcafe'; // ...
0
votes
0
answers
25
views
TestCafe React input file type causing error
I have a React div on my JSX file like this:
<div>
<label htmlFor="getFile">
<input
id="getFile"
className="hidden"
type="file&...
0
votes
0
answers
18
views
Testcafe is passing a test that throws a JavaScript error
I'm using Testcafe 3.3.0 with the following setup:
.testcaferc.json
{
"browsers": ["chrome"],
"baseUrl": "http://localhost:4200",
"src": &...
0
votes
2
answers
43
views
How to hide custom TestCafe t.report data from spec output
I want to use t.report() to pass lots of custom data to my custom reporter. However, all t.report() calls get logged to the default spec reporter output:
Report data:
- [object Object]
- [object ...
0
votes
1
answer
41
views
Tastcafe Studio is not able to record testcase step
Hi I am trying to record automatic testing testcase using testcafe studio,
But the testcafe is not able to record the date selection from calendar popup date selection.
Here is the calendar Image [1]: ...
0
votes
0
answers
40
views
Is there a way to improve the TestCafe compilation time?
As of now, the compilation time for our tests takes about 25-30 seconds and then the browser opens.
We don't seem to have that many imports so not sure why it takes so long to compile
import config ...
0
votes
1
answer
19
views
Should click event be triggered by clicking on a disabled button?
Noticed this request from 2 years ago: https://github.com/DevExpress/testcafe/issues/5240. However, should this be allowed behaviour ?
Case scenario:
I have a button that is disabled because user need ...
0
votes
1
answer
38
views
TestCafe unable to connect to localhost specified in my hosts file that connects to a DevTest aka Lisa Service Virtualization system
How can I connect to localhost?
Local host is specified in my hosts file like below:
#SSL enabled port: 44323
127.0.0.1 visual.tests.com
127.0.0.1 visual.tests.com/motors
fixture`Motors ...
0
votes
1
answer
25
views
How can I run a TestCafe autotest on a page that requires certificate validation?
I need to use TestCafe to run an autotest on a page that requires certificate validation.
In my .testcaferc.json file I have added SSL certificates and when I run the test, first in the Chrome window ...
0
votes
0
answers
19
views
Does API of TestCafe setFileUpload have auto convert content type of File
I'm using testcafe for creating automation test script and have test scenarios related to upload file.
I have create function to upload file
async setFileToUpload(filePath) { await t....
0
votes
1
answer
26
views
Urls getting appended in test cafe
When I trying to click an hyperlink on my app in test cafe it suppose to route to url(https://xxxxxx/test/docs) but the testcafe is appending the hyperlink url with existing page url and trying to ...
0
votes
0
answers
30
views
Test Cafe: ERROR Cannot find the browser. "/bin/sh" is neither a known browser alias, nor a path to an executable file
FROM testcafe/testcafe
USER root
WORKDIR /usr/src/app
COPY tests/TestCafe tests/TestCafe
WORKDIR tests/TestCafe
CMD /opt/testcafe/docker/testcafe-docker.sh chromium:headless --no-sandbox --...
0
votes
0
answers
14
views
Testcafe: How to achieve ctrl+ mouse wheel action
I want to simulate the ctrl+ mouse wheel action in testcafe.
To verify that canvas resizes in response to this.
The following code not take effect,and webpage throw a js error.
test.only("temp&...
0
votes
1
answer
25
views
How to execute multi window/tab TestCafe scripts on BrowserStack?
We've automated multi tab/window scenarios using TestCafe scripts which can be run on local system without any issues. But we're getting the below error when we execute them on BrowserStack
Errors:
...
0
votes
1
answer
28
views
I can't use third party assertions like it fit describe fdescribe on Testcafe
I would like to run tests from another fixtures using assertions like: .describe .it .fit .test, etc
I already import the Testcafe module:
import { testcafe} from 'testcafe';
Or
import { t, Selector, ...
0
votes
1
answer
26
views
How to continue executing the following script when an assertion fails in testcafe
enter image description here
The picture is for reference
1.How to display a passing assertion on the console?
2.If the second assertion fails, how to continue executing the next assertion?
I do a lot ...
0
votes
1
answer
22
views
Can Testcafe fire the event listener of an <input type=number> in my project?
My project code:
html:
<input id="min-days" type="number" onchange="javascript=onRefresh();" oninput="validity.valid||(value='');" placeholder="0 days&...
0
votes
1
answer
29
views
what safari/firefox setting would stop testcafe setup working that works fine with Chrome?
I'm using Testcafe and started with Chrome as my test browser.
Once I had a working setup I tried it on Safari and then Firefox.
On Chrome my tests are found and all succeed.
On Safari and Firefox the ...
0
votes
1
answer
122
views
How to use disableNativeAutomation in TestCafe for one test only?
Native Automation Mode doesn't support multiple windows.
I have two tests.
One of them uses multiple windows.
import { Selector, ClientFunction, t } from 'testcafe';
fixture('two tests')
.page(...
0
votes
1
answer
33
views
The issue with TestCafe click event after the appearance of a modal window
In one scenario, I need to click the "+" button to increase the value in the input field. After that, a modal window appears, which requires confirmation by clicking the confirm button. I ...
0
votes
1
answer
40
views
Use value baseURL in config file in TestCafe when using method navigateTo()
I'm using Testcafe for creating automation test script.
I have defined the config file with value of baseURL to navigate to that web when starting Testcafe
{
"baseUrl": "https://...
1
vote
1
answer
169
views
Anyone who have/knows how to migrate from Testcafe to playwright?
Hi has anyone migrated to the playwright from testcafe or has a some guideline how migration would look like? Does it take long time ? Any information or guide would be help full please.
We are fornow ...
0
votes
1
answer
35
views
In testcafe, can you create a custom test action that chains custom calls until it returns a TestControllerPromise?
Here's how I'd like my testcafe custom test action to look:
await t
.click(Selector(/* ... */))
.customActions
.toFindOneDialogElement() // returns my code
.withExactTitle("...
0
votes
0
answers
15
views
Set a private value in Azure Pipeline and integrate with TestCafe when running pipeline regression
Currently, I'm using TestCafe to create automation test scripts and integrate CI/CD with the Azure pipeline. We need to login to the web to start testing.
I want to set a private value for the ...
0
votes
1
answer
45
views
Testcafe - Cookie set in global test hook 'before' is not found in test
In testcafe I want to set a cookie when testcafe runs which the tested website can use as condition to do something e.g. hide some dialogs to make tests more simple.
In my configuration file ....
0
votes
0
answers
19
views
Testcafe not generating report with large amount of screenshot
I am producing more than 300mb of report file. Our testcases has large amount of screenshots. Testcafe also not generating any error. Its just producing empty report file sometime. could you guide me ...
0
votes
1
answer
36
views
TestCafe. How can I see the list of all opened browser tabs?
I'm trying to use TestCafe with multiple browser tabs.
I have an web page which loads js scripts. An automated click into an overlay opens a new browser tab.
The tab is opened in the browser.
"...
1
vote
1
answer
34
views
How to handle print window in test cafe?
User clicks a button and it opens another browser window with a document preview and immediately the print dialog is also opened. How can this be handled in the test? I looked at ...
0
votes
1
answer
23
views
In testcafe if we set disableScreenshots parameter to true than it ignores the t.screenshot() action and the takeOnFails parameter
if we set disableScreenshots parameter to true than it ignores the t.screenshot() action and the takeOnFails parameter. Is there a way we can only ignore t.screenshot() action but it should still ...
0
votes
0
answers
72
views
Migrate from Testcafe to playwright
We are using Testcafe for a while and we have test automation there in javascript and typescript. We are thinking to move to Playwright is there a way that we can easily migrate without of rewriting ...
0
votes
0
answers
16
views
Test cafe javascript framework - I am getting the action is expected to be an <iframe>
I am trying to switch to a inside a and using await t.switchToIframe('elementSelector');
And then clicking on an element after this.
But getting error on switch to iframe line as The action element ...
0
votes
1
answer
84
views
Is it possible to enable / disable native automation at testcase level
We have mix of multi-window and non multi-window testcase as part of our suite. Since multi-window is not supported currently with nativeAutomation mode, is it possible to enable/disable at testcase ...
0
votes
0
answers
27
views
How do I use testcafe-hammerhead behind a load balancer that implements HTTPS?
Our public facing domain that will implement the web proxy has the SSL implementation behind a load balancer, this works fine however the website that's being proxied will now try to call resources ...
0
votes
1
answer
80
views
How to implement custom action in testcafe using typescript?
I'm trying to implement custom action but with no luck. I'm getting an error telling me that my custom action is not a function when running test using new custom action.
TypeError: testcafe_1.t....
0
votes
1
answer
36
views
addCustomDOMProperties results in "does not exist on type"
testcafe 2.6.2
I'm having trouble using Selector.addCustomDOMProperties to wait for an <img> to finish loading before attempting a t.click() on it.
When trying to click an <a> on my page ...
0
votes
1
answer
21
views
How to use Custom Actions with TypeScript only?
The documentation tells, that in order to use custom actions, you need to use a JavaScript based configuration file and define your methods.
In my case, I want to add a customMethod that needs already ...
0
votes
1
answer
28
views
Where do I place hooks when running testcafe-hammerhead Proxy standalone?
I know testcafe supports various hooks for requests that are going through the testcafe-hammerhead web proxy. In my project I'm running the proxy standalone without the testcafe framework itself and I ...
0
votes
0
answers
29
views
TestCafe GitLab pipeline DNS failure
I'm stuck on this one hence wondering if someone could help.
The test scripts I've created are run with no problem locally. When I run them on Gitlab pipeline I get the following error:
Failed to find ...
0
votes
1
answer
84
views
Proxy / request inspection middleware in testcafe-hammerhead
Could anyone point me in the direction of where in the codebase for testcafe-hammerhead I would be able to implement a piece of middleware that inspects an incoming request and sets a forward / ...
0
votes
1
answer
50
views
testCafe --Unable to get the content of the exported file
Business scenario: Click the button to export the content of the table as an Excel file. I need to test whether the data in the table is equal to the content of Excel. It is enough to judge that the ...
0
votes
1
answer
50
views
TestCafe got Failed to find a DNS-record for the resource after version 2.2.0
I'm testing on my localhost.
When I run test using TestCafe version 2.1.0 and before, the test works fine, but after I use version after 2.2.0, I got this error
Failed to load the page at "https:/...
0
votes
1
answer
28
views
testcafe selector and expect timeout options are not absolutely clear
testcafe 2.6.1
nodejs 16.19.0
I have a following examples:
import moment from 'moment';
import { Selector } from 'testcafe';
fixture `A set of examples that illustrate how to use TestCafe API`
....
0
votes
2
answers
170
views
ERROR TypeError: Cannot read properties of null (reading 'pendingTaskDonePromise')
I am using Jenkins to run some tests. We seem to get some errors after updating to the latest version of testcafe.
12:13:30 ERROR TypeError: Cannot read properties of null (reading '...
0
votes
1
answer
29
views
How to create a bookmark for a url and reopen the bookmark in chrome using TestCafe automation
I have a scenario where I need to bookmark my report url and then changed the user permission to not to allow to view the report. If the same user try to open the saved bookmark url he should not be ...
0
votes
1
answer
132
views
TestCafe works on node 14 but fails on node 18
We have a number of working TestCafe tests for our application, and they've been working very well (95-100% success). We've been on node 14 and are upgrading to node 18 because of node EOL support.
...
0
votes
0
answers
30
views
Testcafe- unable to launch long url with 4127 characters
We are sending a payload token in URL on redirect which is lengthy encrypted payload which is around 4127 characters and TestCafe is unable to process this url and seeing blank page
It works with ...
6
votes
1
answer
205
views
How do I prevent Testcafe interacts with the target element even if overlapped by another element?
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 ...
0
votes
0
answers
46
views
How to find text node after an element using CSS Selector? [duplicate]
I've the below HTML content and I want to read the text "Component" using CSS Selector (not XPath). Is there a way to read this text in this scenario ?
I tried appending "+ #text" ...
0
votes
0
answers
37
views
TestCafe Can't Find Tests, Sort Of
All of a sudden, my TestCafe setup can't find named tests. For example, if I run
testcafe chrome tests/myfolder/my-test.ts, it will not run as the test file cannot be found.
However, if I run ...