Questions tagged [testcafe]

1

votes
1

answer
57

Views

Testcafe-hammerhead erorr reset-guard.ja:27

I am getting an error sometimes when I run testcafe /opt/testcafe/node_modules/testcafe-hammerhead/lib/request-pipeline/connection-reset-guard.js:27 throw err; ^
Rafaa Turki
1

votes
1

answer
86

Views

how to fix 'AssertionError: expected false to be truthy' error?

I am beginner on E2E Tests and I want to make a e2e signup to a github account test with TestCafe, but I get this error when runing test: ExternalAssertionLibraryError { code: 'E53', isTestCafeError: true, callsite: CallsiteRecord { filename: 'TestCafe\\authentication.page.js', lineNum: 152, callsit...
hanae
1

votes
1

answer
51

Views

How to get first occurrence of the element from multiple match found in testcafe

There are cases where I can see multiple node matches found if I evaluate my Selenium xpath/locator. Example: //span[@username='xyz'] ( sample code using Selenium ) if the above relative path matches with multiple nodes (ex: 5 matching nodes found. Find the list of matching nodes below ). In seleniu...
Yuvaraja KS
1

votes
1

answer
71

Views

automation tests execution on mobile devices

In order to address the question, I have to shortly brief you: I'm writing and running e2e-automated-tests in order to test our company's web-site; the purpose is off-course, to make sure we have the site tested on both desktop and mobile phones; our tests are written in typescript, under a node.js...
Eugen
1

votes
2

answer
36

Views

How to avoid writing browser cookies when running testcafe tests?

I am running the testcafe tests for a website. I want to avoid writing any browser cookies while running my testcafe tests. My website writes cookies but while running tests I want to avoid this. Is there any way to achieve this in testcafe?
Ruchi
0

votes
0

answer
5

Views

Responsive Design Testing using TestCafe

As part of evaluation for a new test automation framework, I am looking to see if we can automate testing for responsive designs of a website. To give you a better idea, today we use the GALEN framework to do this. Our tests cover things like pixel points, height, width, colors, sizes of containers,...
Monnie_tester
0

votes
0

answer
2

Views

Launch browser through testcafe without test

I want to use testcafe to start browsers available through internal end external browser providers. I dont want any testing functionality. But I want to be able to use takeScreenshot, resizeWindow etc. Here is my code. const pool = require('./node_modules/testcafe/lib/browser/provider/pool.js'); poo...
htho
1

votes
1

answer
178

Views

node js: I to get the output of an (child) exec and set a variable to be retuned?

I have been searching for a truly example, but I could not find any. I m fully new to node js. I am setting up a service which gets passwords using a command line tool. The command line 'pw get key' returns the password associated with the key. The command line 'pw set key password' sets the passwor...
mariotti
1

votes
2

answer
117

Views

Download file - Save popup in Internet Explorer using TestCafe

In Internet Explorer, whenever a download file window is asking for three options 1. Open 2. Save 3. Close Due to company policy, can't disable popup. However, need to handle same in TestCafe automation. What to click save/save as option? Request for a solution.
Hiruthere
1

votes
1

answer
50

Views

How to locate/click selector (button) using testcafe

I am trying to test the submission of an application using testcafe. However, I don’t seem to be able to get testcafe to click the ‘Submit Application’. I have tried the following so far: .click(Selector('button').withText('Submit Applicaition')) .click('#submit-application').withText('Submit...
Milka
1

votes
0

answer
52

Views

Can testcafe connect to a Smart TV development deployed app?

I'm evaluating whether testcafe can be driven inside an embedded app, for instance a Tizen or WebOS Smart TV. By creating a runner and browser connection one can make the app be fully controlled by navigating to the remoteConnection URL. [1]. But that's replacing the app itself. I'd rather pass on c...
José Pedro Dias
1

votes
0

answer
57

Views

Test that works on local machine not working on pipelines

So I wrote a test that I want to run and have tested it and it works perfectly on my local machine. I then moved it to the pipeline in bitbucket and I get the following terminal output from my makefile g++ -g -c run_test.cpp g++ -g run_test.cpp -o rund g++ -c -o run_magento_test.o run_magento_te...
1

votes
1

answer
63

Views

testcafe waiting for backend service to come up

We have a C/S-architecture, with Angular based front-end to be tested with TC. The back-end needs some time to come up, whilst the front-end is coming up very fast. The result is that the first tests against the front-end fail, whereas the later tests run fine. Because I don't want hard timed wait-...
user9890832
1

votes
0

answer
314

Views

experiencing super slow tests with testcafe

I'm currently experimenting testcafe for the first time, I use the testdriven.io course as an example, and I'm facing real slow tests. For instance testcafe e2e/login.test.js which is basically a register and a login takes sometimes 6min to pass, which i found insanely slow compared to the 15s the a...
euri10
1

votes
1

answer
45

Views

Using TestCafe with mobx

I am trying to use testCafe and testcafe react selectors with my mobx app for end to end testing. React selectors have very convenient selectors. For eg: for components as follows: Item 1 Item 2 Items count: {this.state.itemCount} Selecting a component is as easy as: const TodoList = ReactSelector...
Pravin
1

votes
1

answer
88

Views

Can't find TestCafe on remote Windows machine when connected over ssh

I've installed testcafe globally on windows 7. When I am connected over ssh It can't find testcafe. error - 'testcafe' is not recognized as an internal or external command What do I need to do to make it working? thanks
A R
1

votes
1

answer
114

Views

Testcafe Localhost behind has issues?

Using the latest version of Testcafe... I'm behind a corporate proxy. Using --proxy myproxy:proxyport works fine. but when I try to use localhost, it continually responds with service not available. I have now added --proxy-bypass localhost:8080. But that has the same result. Has anyone else exp...
James
1

votes
0

answer
278

Views

TestCafe: Cannot read property 'message' of undefined

When Runing Jenkins on Ubuntu 18.04. Using the Alpine node container, I've attempted doing something like this below. I'm getting the message TypeError: Cannot read property 'message' of undefined at /var/jenkins_home/workspace/LP_Sandbox_EricTestsPiplineCmds/node_modules/browserstack-local/lib/...
Eric Sherman
1

votes
1

answer
54

Views

Trying to find column/row headers on a screen that contains multiple tables

So my scenario is: I have 2 tables on a screen, table 1 has certain data in it. I want to assert that in each table the correct column & row headings exist. So far what I have tried is: - .expect(page.Table.nth(0).page.tableHeaderRow.nth(1).withText('row heading').exists).ok() However when I try th...
huss-is
1

votes
1

answer
111

Views

How to correctly logout when using roles

when using roles in TestCafe I can't seem to get roles to correctly logout. Or, more importantly I can't get two consecutive tests to execute using the same Role. A little background: I am testing an enterprise website (Sorry, cannot share) that requires a login. When using t.useRole(account) the lo...
Liam
1

votes
0

answer
103

Views

File upload in TestCafé

I'm trying to figure out how to get a file to upload in my test. My app doesn't quite match the workflow described in the app for setFilesToUpload so I'm having trouble. To upload a file in my app, you click an 'Upload' button which opens a native dialog. Clicking okay on the dialog brings you to a...
Samantha Blasbalg
1

votes
0

answer
74

Views

Testcafe not loading page completely - iframe parts missing

I have a internal page which contain a header and then a part where some news content is shown. The header part is found under and that is a part that is shown. The news flow content is found under . The problem I have is that the content in the table iframe is empty when run via testcafe. There is...
ASE
1

votes
0

answer
66

Views

Testcafe-vue-selector no data bind in component

I have problem with testing my Vue component I going to use e2e testcafe with testcafe-vue-selector but some component witch I try test and they do not have any state, computed, props if they have not seen it at all :( Other components works fine. Component export default { name: 'Auth', inject: [...
Mateusz
1

votes
1

answer
217

Views

Awaiting For Elements To Appear Within TestCafe In The Context Of A Page Object Pattern

I use a page object model to store locators and business functions specific to a certain page of the application under test. You can see a sample page object pattern style here https://github.com/bhreinb/SYSTAC All the page objects go through a function called pageLoaded() method which can be found...
bhreinb
1

votes
1

answer
177

Views

Error: Unable to find the browser. “browserstack:[email protected]:Windows 10” is not a browser alias or path to an executable file

I have been having some issues in running some JavaScript tests via TestCafe. The project I have set up uses a BDD style and it invokes the TestCafe test runner to run the tests. I have integrated them using browserstack however, I am having when I run it from Jenkins. I keep getting this error and...
user758759
1

votes
0

answer
61

Views

Structure Dynamic TestCafe runs

I'm trying to test that multiple types of users (separated out into roles) can log in and view a listing page and each applicable type of filter. Since it's redundant to write this N times for every user compounded by every filter I'm using the following: export const filters = { typeOne: { 'Alerts'...
Fluidbyte
1

votes
0

answer
116

Views

TestCafe does not route properly with react-router-dom

I'm attempting to use TestCafe for E2E testing in a react app. The react app uses react-router-dom, so it has a routing section like: ... Test cafe loads via proxy, so in local environments, it has a path like (approximately) http://172.24.160.0:54004/http://localhost:8080/login. As a result, react-...
Gabriel
1

votes
0

answer
141

Views

Run TestCafe in Firefox browser using docker container via Jenkins

I want to run the TestCafe in firefox browser(not headless) through Jenkins. I'm using docker container which has chromium and firefox installed. When I try to run it firefox it's throwing an error as ERROR Unable to establish one or more of the specified browser connections. This can be caused by...
questionar
1

votes
0

answer
82

Views

testcafe's Chrome refusing POST request to api (ipfs-http-client + infura)

I'm trying test an app that uses ipfs-http-client module + infura.io as http provider. It doesn't work in testcafe's chrome (but it works everywhere else, like if I manually test my app in chrome). Here's the console error I'm getting: POST http://192.168.1.33:62108/gkheFCZHj/https://ipfs.infura.io:...
cooldude101
1

votes
0

answer
63

Views

TestCafe + VPN can't open links without trailing slash

Connection to our website is through VPN. When we try to use .navigateTo('https://mainwebsite.net/app1') TestCafe will not load that page, it will be infinite loading. But if we add / at the end of that url .navigateTo('https://mainwebsite.net/app1/') it will work. Same issue when clicking links. Tr...
Stiks
3

votes
1

answer
46

Views

Select OK button from N'th modal opened in testcafe

I open two modals in my testing, and I want to be able to click on the 'OK' button in the second modal (the second selected element in the below html). My current code is : import { waitForReact } from 'testcafe-react-selectors'; import { Selector } from 'testcafe'; fixture `App tests` .page('http:/...
Michael Hackman
1

votes
0

answer
77

Views

Chrome browsers stay open while running “fake parallelism” with TestCafe

I'm currently using TestCafe as my main test framework in my company. I just encountered a problem recently: we have a designed pipeline that launches tests in a parallel way, but not the way Testcafe is supposed to work. I know that testcafe can handle parallelism though concurrent test execution...
Sylvain Philippe
1

votes
0

answer
33

Views

IE won't open when running testcafe from CI

I'm trying to run testcafe from gitlab ci using gitlab-runner ssh and/or shell on windows. All browsers are working fine, including edge, except for ie 11. The test freeze on the windows 10 virtual machine. If I run the tests directly from the virtual machine or ssh, everything is working fine.
Mika
1

votes
0

answer
71

Views

How do I resolve, browser disconnected error running testcafe test1.js on firefox:headless with SUSE

Setting up testcafe on a new version of SUSE OS. Running the testcafe getting started a test on SUSE using firefox:headless I get a long pause then the error : testcafe firefox:headless test1.js --reporter=xunit 'ERROR The Firefox 66.0.0 / Linux 0.0.0 browser disconnected. This problem may appear w...
Cuffy
1

votes
1

answer
417

Views

How to start a browser with specific URL on a remote machine using Karma or other tool?

For e2e tests, I use Testcafe that allows run tests on remote devices. To start tests on remote devices I must enter a generated by Testcafe URL in a remote browser. Can anybody suggest a solution when I can remotely start a browser and tell it to go to particular URL? Maybe someone who works with K...
A R
1

votes
1

answer
60

Views

I want to create my first test using testcafe but getting error as below

I am writing my first test using testcafe in visual studio code but getting this error 'import: The term 'import' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try...
Bravo535
1

votes
1

answer
12

Views

How do I debug a Testcafe browser running in a testcafe/testcafe docker container?

Got a test for a React app's login function in a Page class: async login(t) { console.log('starting login...'); debugger; this.logBrowserMessages(t); await this.loginModal({ visibilityCheck: true }); await t .expect(this.loginModal.visible) .ok() // then log the user in etc... And the test, which...
jcollum
1

votes
1

answer
386

Views

Request Blocking Using Javascript?

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 requests from certain URLs for an automated test that i am writing in JavaScript (using testcafe, if tha...
A7A
1

votes
1

answer
337

Views

Typescript: How to manage dependencies with conflicting type declarations?

I have the error: Subsequent variable declarations must have the same type This is occurring because two of my dependencies, both of which I need; declare the same type. Jest :/node_modules/@types/jest/index.d.ts => declare var test: jest. testcafe node_modules/testcafe//ts-defs/index.d.ts => declar...
micahblu
1

votes
1

answer
245

Views

Saving a screen shot in ./ directory testcafe

I am running testcafe with the options --screenshots --screenshots-on-fails what I want it to do is save a screen shot in my current working directory but instead, it saves it in screenshots/${DATE}_${TIME}/....... is there a way to specify a file to put the screen shot in like --screenshots -n './f...
Vladimir_314159

View additional questions