Created
December 21, 2020 20:49
-
-
Save zaynelt/1c6d62916b0a26f9e173981edc27c98b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ACCESSORS = { | |
username: '#username', | |
password: '#password', | |
form: '#login_form' | |
}; | |
const PAGE_LOAD_TIMEOUT = 10 * 1000; // 10 seconds | |
await remote.URL("https://test.salesforce.com"); | |
const form = await remote.$(ACCESSORS.form); | |
await form.waitForExist(PAGE_LOAD_TIMEOUT); | |
const usernameInput = await remote.$(ACCESSORS.username); | |
await usernameInput.setValue(<USERNAME>); | |
const passwordInput = await remote.$(ACCESSORS.password); | |
await passwordInput.setValue(<PASSOWRD>); | |
const loginButton = await remote.$('#Login'); | |
await loginButton.click(); | |
await remote.pause(5 * 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment