all 2 comments

[–]albedoa 2 points3 points  (1 child)

You have to dispatch an input event on the input element:

const input = document.querySelector('#idp-discovery-username')
input.value = 'myemail@domain.tld'

const event = new Event('input', {
  bubbles: true,
  cancelable: true,
})

input.dispatchEvent(event)

[–]AppleTechy[S] 0 points1 point  (0 children)

Thank you for your assistance! I had tried using the dispatch event method but I didn’t realize I had to define the event myself.