Forum Discussion
Hi HimanshuTayal ,
I'm referring this link-https://support.smartbear.com/readyapi/docs/requests/auth/types/oauth2/automate/sample.html
For the login page:
I tried using the below code:
//// This script checks what page is displayed and provides the appropriate data. It uses the project-level "user" and "pass" properties.
if (document.getElementById('username') && document.getElementById('Login')) {
document.getElementById('username').value = "jagruti.wani@********dev";
document.getElementById('password').value = "********";
document.getElementById('Login').click();
}
When I try to run the script, it works and the application gets open, but it does not fill the user and password information on the application's page.
Just the login page gets open as shown in the attached screenshot.
It does not fill the password. But when I close the page, I get 'All scripts executed successfully' pop-up as shown in the attached screenshot.
Thank you in advance,
Jagruuti Wani
Hi Jagruuti , our Customer Care engineers will be able to provide you with a solution faster in this case since this situation requires a deep investigation!
Please raise a support ticket here and it would be great if you could share the solution here when you receive it. Thank you!
Hi sonya_m ,
Actually, I had already raised a support ticket and it was getting much delayed so I thought of taking help from you. But then KirillZakharov came to rescue. Let me describe the solution-
The code was correct.
It is just that I had to add that code on the Consent screen and not on the login screen.
Please find the attached screenshot.