https://cypress.io logo
Join Discord
Powered by
# help
  • p

    prehistoric-coat-14711

    07/06/2022, 12:32 PM
    hi, is anyone here using
    cypress-testrail-accumulative-reporter
    ? I was wondering if it's possible to add multiple test cases ids to an it and have the results added to testrail (e.g. 'C1 C2 C3 - test') or how do you guys proceed with adding results to multiple tcs that are checked in a single automated test?
  • l

    lemon-kite-81269

    07/06/2022, 3:14 PM
    Can someone share an example code In which you are login to application using "IF" condition like you are validating wrong username/password warning message.
  • b

    bitter-fountain-36713

    07/06/2022, 3:17 PM
    @lemon-kite-81269 if you are testing a wrong username/password that should be a separate test from a correct username/password. Both can use a small util function to enter the creds and click log in but should have different steps to validate each outcome.
    Copy code
    js
    it('correct username/password', () => {
    // correct username and password flow
    })
    
    it('wrong username/password', () => {
    // correct username and password flow
    })
  • l

    lemon-kite-81269

    07/06/2022, 3:20 PM
    I know this but can we cover this in one IT block ?
  • l

    lemon-kite-81269

    07/06/2022, 3:24 PM
    Also can someone suggest good element selectors tool ?
  • b

    bitter-fountain-36713

    07/06/2022, 3:31 PM
    In my opinion, they are separate tests and should be kept in separate IT blocks.
  • b

    bitter-fountain-36713

    07/06/2022, 3:32 PM
    Your browser dev tools is good.
  • l

    lemon-kite-81269

    07/06/2022, 3:34 PM
    Okay 👌
  • p

    proud-knife-88264

    07/06/2022, 4:08 PM
    Hello. I am trying to test a site but it won't pull up the URL. It gives an error stating "URL Request too long", however when I use Protractor with the exact same URL it will load. Does anyone know why that would be? Thank you
  • b

    breezy-hydrogen-39214

    07/06/2022, 7:05 PM
    Hello, all of a sudden my test is failing. It is saying (uncaught exception) TypeError: ev.element is not a function. this happened after I tried to go from Cypress 9.7 to 10 but then had to go back to 9.7
  • b

    bitter-fountain-36713

    07/06/2022, 7:10 PM
    Uncaught exceptions are events thrown by your app. It is a bit odd that the exception was only thrown in Cypress 10, may want to check change logs for that. You can ignore the uncaught exception by add the following code to your support/index.js file. https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions
    Copy code
    js
    Cypress.on('uncaught:exception', (err, runnable) => {
      if (err.message.includes('ev.element is not a function')) {
        return false
      }
    })
  • b

    breezy-hydrogen-39214

    07/06/2022, 7:11 PM
    Sorry I did not explain it well. It is being thrown in 9.7.0
  • b

    bitter-fountain-36713

    07/06/2022, 7:12 PM
    Ah, well adding the code should still ignore the uncaught exception and continue with the test.
  • b

    breezy-hydrogen-39214

    07/06/2022, 7:16 PM
    Oh no it got worse lol, now it says Error: cannot find module 'mocha'
    b
    • 2
    • 10
  • n

    narrow-address-65215

    07/06/2022, 7:41 PM
    Hey all, I'm using Cypres to test a **Searchbar **and was wondering if I should use a
    data-cy="searchbar"
    (as in best practices) or use
    role="search"
    (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/search_role ) ? My entire searchBar being a
    <div data-cy="searchbar" role="search"><input/><label/></div>
  • c

    clean-dog-34224

    07/06/2022, 7:59 PM
    Hello. Trying out cypress and when importing some of my libs in the spec file I get long stack traces saying that certain files cannot be found. This seems to be from packages where the entry points are only defined by the
    exports
    field in
    package.json
    i.e. no
    main
    field (https://nodejs.org/api/packages.html#package-entry-points). Is this a limitation of cypress and/or is there any way around it?
  • h

    hundreds-action-33616

    07/06/2022, 9:27 PM
    If someone has a similar problem, I was able to solve the issue by restoring the original window options this way: cy.on('window:before:load', (win) => { win.setTimeout = window.setTimeout; win.setInterval = window.setInterval; win.requestAnimationFrame = window.requestAnimationFrame; win.clearTimeout = window.clearTimeout; win.clearInterval = window.clearInterval; }) cy.visit();
  • h

    hundreds-action-33616

    07/06/2022, 9:34 PM
    Hello, everyone! Cypress freezes when navigating to the particular page. Runner doesn't react at all. I can only force close it. Nothing unusual in the console. Any ideas? Thanks in advance!
  • l

    late-planet-4481

    07/06/2022, 10:23 PM
    Load testing and performance testing are not really the forte of Cypress. You'd do better to look for dedicated tools for that sort of testing. Cypress excels at functional testing.
  • f

    fresh-nail-30646

    07/06/2022, 10:25 PM
    Does anybody has recommendations on articles about moving from Selenium to Cypress? I'm struggling with the inability to assign elements in the DOM to variables. That philosophy just isn't clicking for me. For example, I have a table that I need to iterate over the cells in each row and verify the data, and then do this with each row. In Selenium, this is easy since I can assign the elements to a list and then iterate over the list, but with Cypress this seems like a much bigger task because if I want to call
    .each
    on the rows, then call
    .find
    on each row, but the data in the row hasn't loaded yet, I get an error since the row has loaded, but the text in each column hasn't. Is there something fundamental I'm missing here?
  • g

    gray-kilobyte-89541

    07/06/2022, 10:50 PM
    🙂 think about what you are trying to do and see how you would write it in english - that is probably the closest to Cypress test. You describe declaratively the assertions about the rows, rather than use intermediate variables (of course it is possible too). If you have a table HTML that you can share to show what you are trying to do, I can add an example to my https://glebbahmutov.com/cypress-examples
  • f

    fierce-beach-68131

    07/07/2022, 8:35 AM
    Hello, how doI locate CSS pseudo element in cypress? This is my DOM. Any idea? I already see this answer --> https://stackoverflow.com/questions/55516990/cypress-testing-pseudo-css-class-before but I want to do ask, is there any other way to locate?
  • f

    faint-cat-31237

    07/07/2022, 8:41 AM
    Thank you for your answer ❤️
  • s

    square-pilot-83868

    07/07/2022, 10:58 AM
    hey guys, i have a problem with azure devops release of my tests, once i used for the first time group flag with parallel flag, test passed, after this release, every single one has a error, and information 'The run you are attempting to access is already complete and will not accept new groups.' but i deleted group flag in package.json
  • g

    gray-kilobyte-89541

    07/07/2022, 11:13 AM
    not much different https://glebbahmutov.com/cypress-examples/9.7.0/recipes/pseudo-selectors.html#pseudo-css-selectors
  • e

    enough-plastic-87422

    07/07/2022, 5:03 PM
    how do we preserve login between each spec with cypress 10?
    a
    • 2
    • 3
  • m

    magnificent-motherboard-7250

    07/07/2022, 5:11 PM
    Anyone using GitHub self hosted runners with Firefox? I’m running a hosted runner in an aws ec2 instance and am having what I think are permission issues.
  • m

    magnificent-motherboard-7250

    07/07/2022, 5:34 PM
    We can run the exact thing but without the —user 1001 option on the container for chrome and edge without any issue.
  • a

    adorable-smartphone-87280

    07/07/2022, 8:58 PM
    Session
  • r

    rough-hamburger-82157

    07/08/2022, 5:25 AM
    how to write test case on live video any body know pin me
1...104105106...252Latest