ElementClickByQuerySelector
Interface AntViewDocument
Type: Method
Parameters: String Selectors
Returns: nothing
Executes the click event for the html element that matches the query selector passed via the Selectors parameter.
You can find out more about the javascript querySelector over at MDN: querySelector.
As the request is run asynchronously, the return status of the click is returned in the OnElementClickByQuerySelector event.
There's also a synchronous alternative ElementClickByQuerySelectorSync that wraps this method and the event into one call.
For example you have the following html:
<div class="WebControl WebButton Web_Enabled" id="oMyWebButton">
<div Class="WebCon_Inner ">
<div><button>Click Me!</button></div>
</div>
</div>
and you want to issue the click event at the button html element, but the button element has no name or id attribute.
You can still do that via a querySelector like so:
Document.ElementClickByQuerySelector "#oMyWebButton > div > div > button"
Introduced in AntView release 1.1.375
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024