0

I know this is confusing and difficult because I have not code to show. Thats part of the problem, I dont really understand what is happening and I came here for some ideas.

In my job employees need to connect to two online systems.

The first one is programmed by me. Basically employees need to put some login credentials to enter our internal system to see their calendar, tasks, etc. Everything is good until here

The second system is a CRM site provided from an external providor. Users need to login into that system and the login credentials ARE THE SAME than the first system we have. We are loading this secondary page as an iframe inside the first system.

Considering our users already filled a login/password page I would like to fill automaticaly the second login form with the data we already have.

The problem is that somehow the login form of the CRM have some sort of validation system and if I use javascript to paste the login/password the "login button" remains disabled. The value is there and I can see it in the input field. That button only validates if an user fills the value with the keyboard or paste from the clipboard.

That is all I have at the moment and I dont know how to continue. Is there any way to simulate keyboard input or to ask the page to validate the content of the field? Any idea will be very appreciated.

yenssen
  • 1,171
  • 2
  • 23
  • 37
  • I believe this question is answered via this stack overflow post https://stackoverflow.com/questions/596481/is-it-possible-to-simulate-key-press-events-programmatically – kylejw2 Dec 01 '21 at 20:25
  • nope, unfortunately the answers given there dont work in my case, as they said in one of the answers "dispatchEvent might not update the input field value" – yenssen Dec 01 '21 at 21:02
  • 1
    Instead of simulating a keyboard meaby you could try to replicate the API call that login form is doing? (also, meaby puppeteer can help? meaby you could get the token via this mehotd and put it on the user local store?) Just throwing some ideas, good luck! – Luca De Acha Dec 01 '21 at 21:55

0 Answers0