I try to make a CefSharp.OffScreen application to simulate a login. But when the website has pop-up screen that opens the log in screen, I cannot click on that login button.
For example, for the html code below it is a sign in button that opens a pop up screen to enter email and password.
<spark-button size="medium" full variant="secondary" data-linkname="header-sign-in" data-component="sign-in-start" data-click-intent-id="menu-header-sign-in-link-click" data-activity-rule-type="page-over-page">
<button part="base" class="button" type="button" aria-disabled="false" tabindex="0">
<span part="prefix" class="button__prefix">
<slot name="prefix"></slot>
</span>
<span part="label" class="button__label">
<slot></slot>
</span>
<span part="suffix" class="button__suffix">
<slot name="suffix"></slot>
</span>
</button>
"Sign in"
</spark-button>
I can simulate click on other buttons with document.getElementsByClassName('nav-user-menu-button')[0].click();
javascript code
But, I cannot do it for that sign in button.
I try document.getElementsByClassName("spark-button[data-link-name='header-sign-in']")[0].click();
but it gives error as it is does not include click function.
How can I solve the error?