I am loading the url
https://www.pinterest.com/login in the chrome driver and trying to find the Login Button so I can execute the click method but I get the exception below when executing this code.
OpenQA.Selenium.InvalidSelectorException - Compound class names not allowed. Cannot have whitespace in class name. Use CSS selectors instead.
Code:
IWebElement ele1 = driver.FindElement(By.ClassName("red SignupButton active"));
Here is the button code.
<div data-test-id="registerFormSubmitButton"><button aria-label="" class="red SignupButton active" type="submit" style="border: 0px; height: 36px; display: inline-block; border-radius: 20px; -webkit-font-smoothing: antialiased; padding: 0px 18px; font-size: 15px; font-weight: bold; outline: none; box-shadow: none; cursor: pointer; margin-top: 10px; vertical-align: middle; text-align: center; background-color: rgb(230, 0, 35); color: rgb(255, 255, 255); width: 100%;"><div>Log in</div></button></div>
There is no name or ID, just a class name. Is there some other method I can search by to allow the driver to find the button?