I’m trying to setup my beforeEach to create a new email if none exist before starting my tests, but when I try to count how many emails there are in my beforeEach, it always logs as 0, even if there are more. If I log the count in my it block, it shows the correct count. Does this look correct?
Tag: cypress
moment.js returns invalid Date for moment (String, string)
Wants to compare the timestamp. Tried lots of ways but it is throwing an Invalid Date error. The variables startDate /endDate/testDate returns a same timestamp format in ‘DD.MM.YYYY HH:MM:ss’ i.e. ‘21.12.2021 08:29:00’ Also tried using isBetween() function. But for all the conditions it is throwing result as false. please correct me. Answer From https://momentjs.com/docs/#/parsing/string-format/ momentjs docs screenshot MM in HH:MM:ss
Cypress with react and google API services – how to stub autocomplete
I am trying to test a react webapp (created in a separate project), that contains a popup where there’s an input containing a google auto-complete for cities: (I changed text because of language) I have in “search city” a text input where if data is inserted, google searches for cities and returns results (eg I search Rome, Italy): When I
Get text from series of elements to an array using cypress JS
I’m trying to get comma separated text from series of <th> elements in a table row. I tried to use element.each() method for 3 nested loops from Cypress and it was super slow and was throwing error (cy.click() failed because this element is detached from the DOM.) sporadically in different test levels (Sometimes passed without any issue). I assume this
Cypress JS, is there anyway to ignore some of the network Pending calls
Hi currently using cypress automation framework , when I visit the home page cy.visit(‘/’); some icons are missing and I pretty much don’t care much about their existence since I am working in dev env. But cypress wont go to next step till either the status of those network calls changes to failed or cypress times out. Either way it
Keep dynamic variables between tests in Cypress
I am trying to do a Cypress test where I want to set in an input a random number and after that check that random number is set ok in another page. I’m creating the random number with this function: And setting the variables inside the describe like: The issue I’m currently having is that the variables reset in every
get value from command log in cypress
I m trying to get value from command log in cypress . I tried to get by css selector but I could not get the value. I tried custom commands but I couldnt get it . On the webpage that I do automation test, there s a download button. when I click the button I got the exe file .
Cypress Test Runner unexpectedly exited via a exit event with signal SIGSEGV in circleCI
I am stuck in this problem. I am running cypress tests. When I run locally, it runs smoothly. when I run in circleCI, it throws error after some execution. Here is what i am getting: Current behavior: When I run my specs headless on the circleCI, Cypress closed unexpectedly with a socket error. Error message: The Test Runner unexpectedly exited
Cypress, look for multiple parameters like ID and Class
I was wondering if it’s possible to search by multiple parameters in cypress, for example ID and Class is this something that is achievable??? Answer Yes you can directly use #button_id.button-class In my local I cross created this element: And in the test runner if you could see, I was able to use both class and id cy.get(‘#titleid.titleclass’) and successfully
Cypress select does not have value
I´m writing a Cypress test in which I want to confirm that a certain value is not shown. I want to check that my select element does not have an option with a certain value. An example: So now I want to check that there isn´t an option with value “C” Can someone help me evaluate this? Thanks. Answer Try