Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

475
Views
How to write test in Cypress for Google translator

Test-case:

pre-conditions: visit https://translate.google.com/

steps:

  1. Select English language for left side
  2. Select russian language for the right side
  3. Enter "Test" on the left
  4. Validate all UI

Expected Result: UI appears correctly

My veri bad code in cypress:

    beforeEach(() => {
        cy.visit('https://translate.google.com/')  
    });

    it('test', function() {
        /* ==== Generated with Cypress Studio ==== */
        cy.get('.aCQag > .kHGNJd > .zXU7Rb > .EO28P > :nth-child(2) > .VfPpkd-Bz112c-LgbsSe > .VfPpkd-Bz112c-RLmnJb').click();
        cy.get('.aCQag > .kHGNJd > :nth-child(2) > .bvzp8c > .OoYv6d > .pEyuac > .MeCBDd > .vSUSRc > [jsname="rPx1uf"] > .KKjvXb > .Llmcnf').click();
        cy.get('.aCQag > .kHGNJd > .zXU7Rb > .EO28P > :nth-child(5) > .VfPpkd-Bz112c-LgbsSe > .VfPpkd-Bz112c-RLmnJb').click();
        cy.get('.aCQag > .kHGNJd > :nth-child(2) > .bvzp8c > .ykTHSe > .pEyuac > .MeCBDd > .vSUSRc > [jsname="rPx1uf"] > .KKjvXb > .Llmcnf').click();
        cy.get('.er8xn').click();
        cy.get('.Q4iAWc').should('be.visible');
        /* ==== End Cypress Studio ==== */
    });
});

It is not work, because locators on this page changes all the time. How can I make it work?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!