Commands I use:
document.getElementsByName('username').value = 'username'
document.getElementsByName('password').value = 'password'
And I don’t find FORMNAME
Hoping that someone can help me,
Our end-to-end tests for InfluxDB 2 OSS log in via the UI, so you could reference this code to see what the correct element names are: ui/commands.ts at b5b0a48a6079dacf3ffd0cd175024f6044b7b2a9 · influxdata/ui · GitHub
username element ID is actually
To submit the form, I think you could try:
Hello, I haven’t seen your reply. Thank you for your help, but your solution doesn’t work,
also, I’ve found a solution to get the form (document.getElementByTagName(“form”)).
And in another project I’m working on, I found another solution to send form:
button is the ‘sign in’ button as an example.
But I might be cursed, it still doesn’t work.
When I change the value of my password and username fields, and the use ‘click()’, it tells me that I didn’t filled up the fields:
And I think I’ve found why it doesn’t work, it’s because these fields are not filled:
POST /api/v2/signin HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
Accept-Encoding: gzip, deflate
authorization: Basic Og== <-----------------this one
Cookie: <-----------------this one too