This is a proof of concept to see how well TestCafe can handle UI testing a Salesforce Org.
Create a Salesforce.com (SFDC) Developer Org
usernamedoes not need to be the same as your email.
- Opt for the format
- Check your email
- Verify your account
Whitelist IPs: Disable the Email Verifcation on Login
Then in the Quick Find window type Profiles. It should reduce the navbar options to Users > Profiles so click on Profiles.
Navigate through the list view of profile until you find System Administrator. Click on the named link System Administrator (not the Edit link).
Scroll down to the
Login IP Ranges Related List and click New.
Enter the IP range that you are connecting from. Worst case scenario, enter the
start: 0.0.0.0 end: 255.255.255.255.
Get your SFDC Org ID
You will need your
Navigate to the following link after you login:
And look for the field:
Salesforce.com Organization ID. Copy the 15 character ID.
Clone and Run Tests
git clone <this repo> npm install # Setup test Org credentials mv .env.sample .env vim .env npm test
Alternative test scripts:
npm testRuns both firefox and chrome in a headless mode
npm run test-allRuns both firefox and chrome (not headless)
npm run test-chromeRuns just chrome (not headless)
npm run test-firefoxRuns just firefox (not headless)
npm run test-chrome-headlessRuns just chrome headless
npm run test-firefox-headlessRuns just firefox headless