I'm very new to JavaScript, but I'm trying to automate a series of clicks on a webpage. I've managed to successfully do this via Selenium with Python, which is my preferred language, however, I've learned that this can be done from the console in 'Inspect Element' via JS.
So far, I have located the element via the document.GetElementByClassName, however when I simply tag on the .click() and press enter, nothing actually happens. I've been watching multiple instructional videos, and in each of them as soon as this is done the click is performed. For some reason, this doesn't happen for me.
The button I am trying to click has the HTML:
<button class="btn-standard call-to-action">Search</button>
When I then enter the following,
document.getElementsByClassName("btn-standard call-to-action");
the console returns a HTML collection, which contains the button. Using the click() method just returns undefined in the console, with no visible action to the button.
I'm aware that this is an awkwardly phrased question, and it's solution may be blatantly obvious to the users here, but I'm at a loss as to why nothing happens. I've also performed the click with the index [0] on the getElement, still to no avail. If it matters, I'm using safari (with the JS enabled).
Thank you very much in advance.
EDIT:
The page I'm trying to access is behind a log-in screen so requires a username and password. However, the same issue is present with the log-in button. The link is: https://www.easports.com/fifa/ultimate-team/web-app/