Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLICK Event on DIV Element #1393

Open
JorgeBrandao1980 opened this issue Nov 16, 2023 · 0 comments
Open

CLICK Event on DIV Element #1393

JorgeBrandao1980 opened this issue Nov 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JorgeBrandao1980
Copy link

JorgeBrandao1980 commented Nov 16, 2023

The html DIV element, it doesn't have the CLICK event set.
And sometimes it's necessary to do this, especially when that element has inserted a hyperlink..

(html.querySelector(
          '#ctl00_ctl00_NestedMasterPage_divTexto_LinkButtonAT_2') as **Element**)
      .click();

Exemple Html:

<div class="bdp "><a id="ctl00_ctl00_NestedMasterPage_divTexto_LinkButtonAT_2" href="javascript:__doPostBack('ctl00$ctl00$NestedMasterPage$divTexto$LinkButtonAT_2','')"> </a></div>

There is no way to click on the html DIV element.

If changing it to another type of element that accepts the 'Click Event' like 'InputElement' gives me the error

    (html.querySelector('#ctl00_ctl00_NestedMasterPage_divTexto_LinkButtonAT_2')
          as **InputElement**)
        .click();

Error: Expected a value of type 'InputElement', but got one of type 'Element'

Thank you, for your work

@JorgeBrandao1980 JorgeBrandao1980 added the enhancement New feature or request label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant