Javascript – Data from fixture file cannot be extracted
I'm trying to get data from a json file to use in my test, but it always gives me an error saying it can't be fetched. I checked a lot of things on the internet, a lot of videos, personally…
I'm trying to get data from a json file to use in my test, but it always gives me an error saying it can't be fetched. I checked a lot of things on the internet, a lot of videos, personally…
I have a .NET Angular App (from the dotnet new angular cli command) that has Cypress setup in the /ClientApp folder. I can run the tests that I have on my local computer. What I am wanting to do is…
I am writing automated test case with Cypress - I need to loop through all children of the element and verify its data. The problem is that all the children are object with tags and href value attribute except for…
I want to know whether an element exists or not and do stuff according to that. I tried many options but failed. For example: cy.get(deleteCellButtonLocator).then(($el) => { if ($el.length > 0) { //found cy.log(cellName + ' exists. Deleting...'); } else…
We have a table in our application: if the table length is more than 5 it shows the pagination and if the length is less than 5 it doesn't Cypress doesn't consider it a good practice to use conditions in…
I want to write Cypress tests for a website that is being loaded as an iFrame in a parent environment. The parent environment injects metatags when loading the site, and I need to replicate this functionality in Cypress. Do to…
I am trying to pass an assertion to if condition and execute a logic when the condition is met and another logic when condition is failed. Since the test is failing on failure of assertion i am not able to…
I have a ReactJS Typescript project with NPM and VSCode. I am getting the following syntax error in VSCode, even though all my Cypress tests run correctly. Error: Cannot find name 'cy' How can I fix? I tried the following…
I have one issue with cypress test. I have such test const deeplinkUrl = 'https://deeplink.page.link/2WmRA4zbfUcQz5AY9'; describe('upload scan view', () => { beforeEach(() => { cy.visit('/deplinkPage'); cy.injectAxe(); }); it('should redirect user to deep link', () => { cy.waitForLoaderRemoval(); cy.getEnabledButton('Install for Free');…
I am testing adding and removing resource in my app. Currently it clears the cookies and does login and customer selection before each test case. My app checks if the cookies are gone then it redirects you back to login…