I’ve started implementing Cypress for some regression tests, and I’m trying to find a particular element in a list of elements. The elements are in this format: On a single page, there are several of these. I’d like to try and target a specific on by the [navigation text], but it is possible for them to have similar text. My
Tag: cypress
Difficulty accessing window object in Cypress
I’m trying to access the window object of my App in Cypress in the following manner. The above method is not working for me as window is returned as undefined. However, the answer in this SO post states the following: Or you can use cy.state(‘window’) which returns the window object synchronously, but this is undocumented and may change in the
How to access the value of baseURL in Cypress
I’m just starting to learn JavaScript and have been using Cypress to automate some regression tests. The test I writing currently is meant to verify link’s text and href in a header and footer. The issue I am having is that these tests need to be run across various environments and I cannot seem to access the baseUrl property set
Wait for an own function (which returns a promise) before tests are executed
I’m new to cypress and am trying to figure out how things work. I have my own function (which calls a test controller server to reset the database). It returns a promise which completes when the DB have been successfully resetted. My goal is to be able to execute it before all tests. How can I do that in cypress?
How can we test the alert and the text it is displaying using Cypress.io Js automation framework?
How can we test the alert and text inside is displaying using Cypress.io Js automation framework? I am unable to figure out the relevant example in Cypress documentation, please advise. Answer Figured out the answer using cy.stub() method as advised by Richard Matsen:
Access a new window – cypress.io
The question is as simple as that. In Cypress, how can I access a new window that opens up when running the test. Steps to recreate : Run the test. After some action, new window pops up (the url is dynamic in nature). Fill in the fields in the new window, and click a few buttons. After required actions are
Setup Cypress.io to access a page through a proxy
Is it possible to setup cypress.io to access pages through a proxy? I have a proxy that I need to go through, in order to test my application. Is there anyway to configure cypress.io to honour the standard HTTP_PROXY environment variables.. or is there some other setup that is required? Answer Update: This is now well documented at: https://docs.cypress.io/guides/references/proxy-configuration.html Unix