https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • p

    powerful-orange-86819

    04/15/2022, 7:35 AM
    is the iframe in the same domain ?
  • a

    adamant-magazine-53646

    04/17/2022, 1:59 AM
    How to get different Json report name for each test spec file that is executed in parallel
  • l

    lemon-toothbrush-55306

    04/18/2022, 4:10 PM
    Hello community! I need a bit help with my case please... I'm developing a
    Wallet
    and as you know you need to take your
    Seed Phrase
    in my case based in
    24 words
    then save it and in the next screen write the correct words in the ramdom inputs that will appear (sometimes will appear 2,3,4 or 5...) and must mach the position with the value obviously here I will leave some screenshots... Okey.. so... In the first screen where I need to save every single word I'm doing like this... idk If is the best way.... Since I have a
    name
    unique for each one... I do this for each word so I repeat this process
    23 times
    chanching
    [name="1"]
    ... etc.
    Copy code
    js
     cy.get('[data-test-id="seedPhrase-show"]')
          .get('[name="0"]')
          .find('b')
          .then(($value0) => {
            const valueText0 = $value0.text()
            cy.wrap(valueText0).as('wrapValue0')
          })
    Now I have every single value saved and we go to the second screenshot where I need to introduce in the
    Ramdom Input
    the value depending on the
    [name=""]
    , so for example in this case I would need to access to
    [name="0"]
    which must be
    family
    to
    [name="9"]
    which must be
    morning
    ...etc , then write in each one the correct word (I remember I will have stored from before in wraps). I could access to the name of every Input with this code.... but doesn't return to me the name value, just
    4
    or
    5
    depending on the ramdom.
    Copy code
    js
      cy.get('[data-test-id="seedPhrase-confirm"]')
          .get('input')
          .get('[name]')
          .then(($valueInputs) => {
            const valueInputs = $valueInputs.append()
          })
    How can I finish this? I'm stuck.
  • g

    gray-kilobyte-89541

    04/18/2022, 4:38 PM
    so you do not know the 24 words beforehand? The test needs to read them from the page?
  • l

    lemon-toothbrush-55306

    04/18/2022, 4:38 PM
    Yeah
  • g

    gray-kilobyte-89541

    04/18/2022, 4:46 PM
    and it is a form showing the original 24 words? Or just DIVs? And then you need to enter the missing words showing randomly on the next form?
  • l

    lemon-toothbrush-55306

    04/18/2022, 4:46 PM
    I have all the values from the 24 words in 24 differents vars
  • l

    lemon-toothbrush-55306

    04/18/2022, 4:47 PM
    And now I need enter in the correct positions in the ramdom inputs
  • l

    lemon-toothbrush-55306

    04/18/2022, 5:48 PM
    Like how could I access to that element?
  • l

    lemon-toothbrush-55306

    04/18/2022, 5:49 PM
    Im trying like this... but Im getting only the name of the inputs but not the value of the name which I need
    Copy code
    js
    cy.get('[data-test-id="seedPhrase-confirm"]')
          .get('input')
          .get('[name]')
          .then(($valueInputs) => {
            const valueInputs = $valueInputs.text()
          })
  • l

    lemon-toothbrush-55306

    04/18/2022, 7:07 PM
    Nobody can help? 😦
  • g

    gray-kilobyte-89541

    04/18/2022, 7:17 PM
    Take a look at this recipe: https://glebbahmutov.com/cypress-examples/9.5.0/recipes/input-element-value.html (you are using "text()" method, but should use "val()" method when working with input HTML elements)
  • l

    lemon-toothbrush-55306

    04/18/2022, 7:20 PM
    Doesn't change anything bro
  • l

    lemon-toothbrush-55306

    04/18/2022, 7:20 PM
    I have tryed also
  • l

    lemon-toothbrush-55306

    04/18/2022, 7:21 PM
    Like... my main problem is... I need to get the
    Id's or name's
    doesn't matter which one since both are uniques, from every Input, but... until I don't get the id's I won't know which one is the ID, since the ID will change in every iteration.
  • g

    gray-kilobyte-89541

    04/18/2022, 7:47 PM
    Ok, it is hard for me to say what you are doing, I gave an example that works for the form, if you can create a codepen with the form markup, I can give you precise working code
  • l

    lemon-toothbrush-55306

    04/18/2022, 8:42 PM
    @gray-kilobyte-89541 I want to save in one var one Array of values and then use it later , how can I do that?
  • g

    gray-kilobyte-89541

    04/18/2022, 11:20 PM
    I would use something like https://glebbahmutov.com/cypress-examples/9.5.0/recipes/aliases.html but again, I do not understand your markup, so I cannot say for sure
  • l

    lemon-toothbrush-55306

    04/19/2022, 10:04 AM
    Why is giving me this error when I guess I'm doing correctly?
    Copy code
    js
    // Añadimos un nuevo contacto
        cy.contains('Nuevo contacto').click()
        cy.get('[data-test-id="address-book-new-contact"]')
        cy.get('[name="accountId"]').type('0.0.30918660')
        cy.get('[name="accountName"]').type('CypressTest')
        cy.get('[name="accountNote"]').type('Testing a bit')
        cy.get('[name="accountMemo"]').type('Here is the memo')
        cy.contains('Guardar').click()
        cy.get('[aria-label=Editar]').click()
        // Comprobamos valores correctos
    
        cy.get('[data-test-id="address-book-new-contact"]')
        cy.get('[name="accountId"]').should('contain', '0.0.30918660')
        cy.get('[name="accountName"]').should('contain', 'CypressTest')
        cy.get('[name="accountNote"]').should('contain', 'Testing a bit')
        cy.get('[name="accountMemo"]').should('contain', 'Here is the memo')
  • l

    lemon-toothbrush-55306

    04/19/2022, 10:07 AM
    Might need something else to get the value?
  • f

    fresh-doctor-14925

    04/19/2022, 10:16 AM
    Try asserting with
    have.value
    , so :
    cy.get('[name="accountId"]').should('have.value', '0.0.30918660')
  • l

    lemon-toothbrush-55306

    04/19/2022, 10:26 AM
    worked! thanks so much!
  • g

    gorgeous-farmer-37128

    04/20/2022, 10:53 AM
    Hi! I just saw that with release 8.0.0 the min version of FF is pinned to >= 86. But I also need to confirm that the tests works with FF 78 which is still used by ~30% (8k) of our customers. So is there a flag/option I can set to force cypress to run with FF 78? I already have a running environment with FF78 but cypress throws me
    Cypress does not support running Firefox version 78. To use Firefox with Cypress, install a version of Firefox newer than or equal to 86.
    currently using
    cypress: 9.5.3
    - as a last resort i could downgrade to cypress < 8.0.0 :/
  • g

    glamorous-architect-52545

    04/20/2022, 4:40 PM
    Hey guys! Good afternoom, anyone can help me? i'm running mine cypress tests, but normally after a few minutes, my brower closes and print this mensage for me
  • g

    glamorous-architect-52545

    04/20/2022, 4:40 PM
    Out of memory
  • g

    glamorous-architect-52545

    04/20/2022, 4:41 PM
    even closing all software, and running only my cypress and vscode
  • m

    magnificent-finland-58048

    04/21/2022, 1:47 PM
    https://docs.cypress.io/guides/references/configuration#cypress-json try setting numTestsKeptInMemory to a low number the default is 50, set it to 20 and see what happens pretty sure things are ok with run mode vs open, is that right?
  • a

    adorable-smartphone-87280

    04/21/2022, 2:31 PM
    And definitely test setting it to
    0
    to see if that fixes it.
  • c

    colossal-car-14055

    04/21/2022, 9:14 PM
    Ran into the same issue listed above when using open mode. Confirmed run mode worked, so I set numTestsKeptInMemory=0 in the cypress.json, then slowly incremented up to 15. Worked great.
  • g

    great-london-82425

    04/22/2022, 4:38 PM
    I use the cypress-axe integration to try to flag accessibility issues but curious what other accessibility tools folks might use with Cypress. Please also let me know if there's another channel for a11y topics.
1...373839...192Latest