Skip to content

Instantly share code, notes, and snippets.

@judell
Created April 23, 2019 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judell/5044890ca5ed898456e3110d1ccbefb0 to your computer and use it in GitHub Desktop.
Save judell/5044890ca5ed898456e3110d1ccbefb0 to your computer and use it in GitHub Desktop.
names = [
'user a',
'user b',
'user c',
]
for (let i = 0; i < names.length; i++) {
Array.from(document.querySelectorAll('button')).filter(b => b.innerText == 'Add member')[0].click()
}
inputBoxList = Array.from(document.querySelectorAll('ul')).slice(-1)[0]
inputBoxes = inputBoxList.querySelectorAll('input')
for (let i = 0; i < names.length; i++) {
inputBoxes[i].value = names[i]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment