'Accessing SalesForce with Cypress.IO
I am attempting to access SalesForce through Cypress but as soon as I sign in the test stops and SalesForce takes over the entire browser.I am able to visit my SalesForce Sandbox page but I cannot get a test to progress beyond there. Where the test ends
Here is my code to access SalesForce:
///<reference types="Cypress"/>
describe("Visit SalesForce with Request", function()
{
it("Visits SalesForce", function()
{
const url = "https://test.lightning.force.com";
const username = "[email protected]";
const password = "password";
cy.request(`${url}/?un=${username}&pw=${password}`)
.then(() =>
{
cy.visit(url);
// Sign in to SalesForce
cy.get('#wrap').find('input').eq(2).click();
// Does not execute beyond this point
cy.reload();
cy.log("Hello, world!");
});
});
});
Any advice on how to get Cypress tests to with the SalesForce would be greatly appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
