I'm trying to execute the task GoogleSocialLogin from cypress-social-logins plugin.
Here is the custom command I'm using for this:
Cypress.Commands.add("userLoginWithGmail", () => {
const socialLoginOptions = {
username: "some_email",
password: "some_password",
loginUrl: "some url",
headless: false,
logs: true,
loginSelector: "", // What should I put here in case of a shadow-dom element?
popupDelay: 3000,
cookieDelay: 2000,
args: [" — disable-web-security", " — user-data-dir", " — allow-running-insecure-content"],
isPopup: true,
getAllBrowserCookies: true
}
return cy.task("GoogleSocialLogin", socialLoginOptions).then(({ cookies, lsd, ssd }) => {
cookies.map((cookie) => {
cy.setCookie(cookie.name, cookie.value, {
domain: cookie.domain,
expiry: cookie.expires,
httpOnly: cookie.httpOnly,
path: cookie.path,
secure: cookie.secure
})
Cypress.Cookies.defaults({
preserve: cookie.name
})
})
cy.window().then(window => {
Object.keys(ssd).forEach(key => window.sessionStorage.setItem(key, ssd[key]))
Object.keys(lsd).forEach(key => window.localStorage.setItem(key, lsd[key]))
})
cy.log("login successful.")
})
})
So what value should I put inside the loginSelector property in case I have an element that sits under the shadow-dom element?
I marked the shadow element I'm trying to reach:

Thanks!