I just starting with JavaScript, focusing in DOM, because I have to automate some human jobs in our web services.
I'm trying to to click on a button, using JavaScript code, but I can't access the click()
function to this button. It's probably because, this is not actually a declared button, the button is inside a <div><span><a>
tag, using role=button
.
Follows part the code in HTML:
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
<span class="ui-dialog-title" id="ui-dialog-title-jobCardDetail">text..</span>
<a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button">
<span class="ui-icon ui-icon-closethick">close</span>
</a>
::after
</div>
How can I click on it?