Closed michaelwschultz closed 4 years ago
By adding popupDelay
and headless : false
configurations, I can see the popup and automated typing an email address. But there is another issue.
Video link: https://www.loom.com/share/0b13b447f9c54a4e81beeee856e45544
Screenshot:
I have tried toggling chromeWebSecurity
flag
Not sure if I am doing something wrong or google added extra browser security check,
Kindly help me out.
const username = Cypress.env('googleSocialLoginUsername')
const password = Cypress.env('googleSocialLoginPassword')
const loginUrl = Cypress.env('loginUrl')
const cookieName = Cypress.env('cookieName')
Under those variables do you have real credentials to Gmail? loginUrl
could be localhost? What should be value of cookieName
?
By adding
popupDelay
andheadless : false
configurations, I can see the popup and automated typing an email address. But there is another issue.Video link: https://www.loom.com/share/0b13b447f9c54a4e81beeee856e45544
Screenshot:
I have tried toggling
chromeWebSecurity
flagNot sure if I am doing something wrong or google added extra browser security check,
Kindly help me out.
Log in to your gmail and turn on Allow less secure apps in Settings
const username = Cypress.env('googleSocialLoginUsername') const password = Cypress.env('googleSocialLoginPassword') const loginUrl = Cypress.env('loginUrl') const cookieName = Cypress.env('cookieName')
Under those variables do you have real credentials to Gmail?
loginUrl
could be localhost? What should be value ofcookieName
?
loginUrl can be localhost, it's the url to your login page. I may be wrong, but I don't think that the cookieName matters that much. I managed to log it using arbitrary value in the cookieName.
I solved it by implementation similar to: https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/stubbing-spying__google-analytics
Log in to your gmail and turn on Allow less secure apps in Settings
Thank you @iledzka for the tip 👍In my opinion, there is a possibility that google might introduce new anti-bot configurations in future and that might break CICD pipeline for no reason.
Testing around 3rd party is anti pattern and I manage to bypass google auth with stubbing and spying techniques.
Hi Everyone! Looks like I'm not the only having problems! Cypress does not find the button, I tried every kind of syntax (type, classes... and a cy.get("class") works) but it does not find the button to open the google login. I'm stuck here.
I always get: waiting for selector "input#identifierId[type="email"]" failed: timeout 30000ms exceeded
but it does not open the login so it will never find it. Any idea? Thanks!
I was able to write a complete login process from AWS Cognito to Google Login pages and back to my app. Might be helpful to some...
Nice little plugin! This is going to be really helpful if I can get it working.
I've turned off headless so I can see what's happening. The google login window opens automatically but I can't seem to get it to fill in the creds. Any ideas?