Skip to content

Commit 95ff8f8

Browse files
internal function for automation
1 parent 24b7ed5 commit 95ff8f8

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

uitools/import/Esri/ArcGISRuntime/Toolkit/OAuth2View.qml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,13 @@ Dialog {
118118
const js = `setTimeout(function() { document.getElementById('user_username').value = '${username}'; document.getElementById('user_password').value = '${password}'; }, 1000);`;
119119
webView.runJavaScript(js);
120120
}
121+
122+
/*!
123+
\internal
124+
\brief Fill and accept the username and password
125+
*/
126+
function applyUsernameAndPassword(username, password) {
127+
const js = `setTimeout(function() { document.getElementById('user_username').value = '${username}'; document.getElementById('user_password').value = '${password}'; document.getElementById('oauth').submit(); }, 1000);`;
128+
webView.runJavaScript(js);
129+
}
121130
}

uitools/import/Esri/ArcGISRuntime/Toolkit/UserCredentialsView.qml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ Dialog {
118118
passwordTextField.text = password;
119119
}
120120

121+
/*!
122+
\internal
123+
\brief Fill and accept the username and password
124+
*/
125+
function applyUsernameAndPassword(username, password) {
126+
prefillUsernameAndPassword(username, password);
127+
acceptWithCurrentUsernameAndPassword();
128+
accept();
129+
}
130+
121131
/*!
122132
\internal
123133
\brief Attempts to apply the current username and password to

0 commit comments

Comments
 (0)