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

125
Views
login to Google Docs using Cypress fails with generic error message

Currently, Cypress is not letting me login using the Google Docs login form. It displays an error on the page with no additional message, not even showing me as a bot. We have a Google Add-on that we want to test, and for this we need to login to Google Docs, I already know about the API based authentication for specific apps but I don't need a token, I need to login to Google. I have tried several things, including passing my Chrome profile as --user-data-dir and preserving its cookies (didn't work), and also to login using docs.google.form sign in form. as soon as you hit next on this form, it breaks with a generic error message. I also tried setting the user agent, and using another browser like Edge .

Here is some test code and configuration in the hopes taht it might help.

module.exports = defineConfig({
"chromeWebSecurity": false,
e2e: {
"chromeWebSecurity": false,
baseUrl: 'https://docs.google.com',
experimentalSessionAndOrigin: true,
}
})
// Test code
describe('empty spec', () => {
it('opens the google test document', () => {
cy.visit('/', {
headers: {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
}
});
googleLoginPage.getEmailAddressField().type(Cypress.env('googleUser'));
googleLoginPage.getNextButton().click()
})
})

class GoogleLogin {
    getEmailAddressField() {
        return cy.get('#identifierId');
    }

    getNextButton() {
        return cy.get('#identifierNext');
    }
}

export default GoogleLogin;

I am using Cypress 10.3.1.

Hope you guys can help because I'm a bit lost, I know it is not recommended to test Google login etc etc but it is a Google Add-on I'm testing, I can't do API based login if I want to login to a google service itself.

about 4 years ago · Santiago Gelvez
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!