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

    boundless-guitar-11547

    12/09/2022, 1:53 PM
    I need help to automate sign in , when the user clicks on the sign in button it opens in a new tab, we just have button tag along tabindex, datatextid
  • g

    gray-kilobyte-89541

    12/09/2022, 2:39 PM
    you can search https://cypress.tips/search for "database"
  • f

    full-helmet-93291

    12/09/2022, 5:12 PM
    hi everyone! I'm trying to add a postgres DB connection to our current e2e framework. I'm currently using Cypress 11 and Typescript, so my config file is .ts. Is there any guide which I can follow to do this? Thanks in advance!
  • g

    gentle-branch-31208

    12/09/2022, 6:45 PM
    In my work i connect to Oracle DB, maybe i have how can u set up
  • g

    gentle-branch-31208

    12/09/2022, 6:48 PM
    when i set up, i do these steps. https://developers.ascendcorp.com/connecting-oracle-database-in-cypress-project-cbcd3bfabdbd
  • g

    gentle-branch-31208

    12/09/2022, 6:50 PM
    careful with the folder structure. it change with new versions
  • g

    gentle-branch-31208

    12/09/2022, 6:58 PM
    how to seperate the cy.intercept ? I cant run cy.intercept in differebnt it() block, only just with cy.visit. Why i cant run test without cy.visit?
  • g

    gentle-branch-31208

    12/09/2022, 6:58 PM
    /// describe('Test suit', () => { it('Test case', () => { cy.visit('https://example.cypress.io/commands/waiting%27) }); it('Test case', () => { //cy.visit('https://example.cypress.io/commands/waiting%27) cy.intercept('GET', 'https://jsonplaceholder.cypress.io/comments/1%27).as(%27getComment%27) //cy.intercept({method: 'GET', url: '/comments/*', hostname: 'https://jsonplaceholder.cypress.io/%27,%7D).as(%27getComment%27) cy.get('.network-btn').click() // wait for GET comments/1 cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304]) }); });
  • b

    bitter-judge-96754

    12/09/2022, 6:59 PM
    Hey All, I implemented Percy to cypress and run command on package.json with including Token but I don’t like token to add plaintext. Where can I store token and call it in package.json?
  • g

    gentle-branch-31208

    12/09/2022, 7:12 PM
    got it 🙂 😄 😍 /// describe('Test suit', () => { beforeEach(() => { cy.visit('https://example.cypress.io/commands/waiting') }) it('Test case', () => { cy.intercept('GET', '**/comments/*').as('getComment') //cy.visit('https://example.cypress.io/commands/waiting') //cy.intercept({method: 'GET', url: '/comments/*', hostname: 'https://jsonplaceholder.cypress.io',}).as('getComment') cy.get('.network-btn').click() // wait for GET comments/1 cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304]) }); });
  • l

    late-planet-4481

    12/09/2022, 8:00 PM
    Unless you're far more clever than me you'll likely need a 3rd party tool to obscure the token, then pass it in to the Percy command line at runtime. I imagine most CI tools offer this functionality. We use Azure DevOps to store the token as a secret, then use a variable in the PowerShell script used to execute the tests.
  • w

    wooden-exabyte-95341

    12/10/2022, 5:57 AM
    Hey all, How to check whether a given css-selector is present in a page or not? The implementation I want to do is : - First check whether that css selector is displayed in page or not - If present I should check the occurrences and delete them - If not present no need to perform any action Things I tried: - I used see cy.get(selector), resolved the promise and stored the length in variable, used that to iterate through for loop and deleted - But when the selector isn’t there I am getting error as cy.get command is failing! Any help would be greatly appreciated 🙏🏼
  • b

    better-mouse-45393

    12/10/2022, 11:24 AM
    #763105090679865354 How I can stop\block log assertion? I have very long assertions and it's annoying to scroll every time
  • f

    fresh-doctor-14925

    12/10/2022, 11:48 AM
    You can pass
    {log: false}
    to a number of cypress commands, but you haven't shared your code so I can't say for sure that it will help
  • b

    better-mouse-45393

    12/10/2022, 11:51 AM
    I have this in my beforeEach : expect(localStorage.getItem(DEFAULT_USER_KEY)).to.be.a('string'); expect(localStorage.getItem(CURRENT_USER_KEY)).to.be.a('string'); How I can use log: false there?
  • f

    fresh-doctor-14925

    12/10/2022, 12:03 PM
    Doesn't look like it. there's an existing issue here if you want to add your voice to it https://github.com/cypress-io/cypress/issues/7693
  • g

    gray-kilobyte-89541

    12/10/2022, 1:31 PM
    you can skip using
    expect
    and just say
    Copy code
    if (typeof ... !== 'string') { 
      throw new Error('Local storage is missing ...')
    }
  • b

    brave-mouse-59640

    12/10/2022, 4:09 PM
    My issue i.e. webscoket connection issue is resolved in new version of cypress i.e. 12.0.2 which is released today. Thanks a lot to Team.
  • i

    incalculable-telephone-16405

    12/11/2022, 5:59 AM
    hi everyone i am facing these errors when i am trying to run db query in the cypress framework with cy. task(). in latest 1. ER_NOT_SUPPORTED_AUTH_MODE: The client does not support the authentication protocol requested by the server; consider upgrading MySQL client 2. Access denied for user ''@'localhost' (using password: NO). so can anybody advice which plugin of mysql works? in the latest cypress.
  • s

    swift-petabyte-74060

    12/11/2022, 6:10 AM
    Hello everyone, I am trying to test the ads that appears in the top of the page, I am currently using cypress v10.9.0. When i run the test, i dont get to see the ads loading. It is supposed to be here . But when i open the same link in normal chrome or new tab in cypress runner I get to see the ads loading
  • s

    swift-petabyte-74060

    12/11/2022, 6:11 AM
    same url but a new tab in cypress window , where i can see the advertisement.
  • b

    better-elephant-20934

    12/11/2022, 3:19 PM
    Greetings. Do you recommend to do webscraping with Cypress in a document (company's Confluence for example) for obtain info and then run the test with this info?
  • c

    cold-author-79999

    12/11/2022, 3:47 PM
    I want to iterate through every record of a table and get a row with matching text.Which is more effective and faster? each,filter,contains? please assist.
  • g

    gray-kilobyte-89541

    12/11/2022, 5:40 PM
    whatever works correctly
  • b

    better-mouse-45393

    12/11/2022, 10:03 PM
    Thank you very much !!!
  • p

    powerful-agency-55160

    12/12/2022, 3:31 AM
    hello everyone, i'm trying catch 2 error specify. Im using code like below :
    Copy code
    Cypress.on('fail', (error, runnable) => {
    
                if (!error.message.includes('buttondoestexist')) {
    
                    throw error
    
                }
    If i want catch 2 message error , example : "does not exist" how i must write condition?
  • c

    cold-author-79999

    12/12/2022, 6:02 AM
    what is the best way to resolve pageload error
  • c

    cold-author-79999

    12/12/2022, 6:03 AM
    i am frequently running into the error and that is quite irritating .i tried increasing pagetimeout but seems it doesn't resolve
  • c

    cold-author-79999

    12/12/2022, 6:04 AM
    create an object for the error and throw the required message
  • f

    fresh-doctor-14925

    12/12/2022, 8:27 AM
    hi everyone i am facing these errors
1...165166167...192Latest