I am trying to locate and click on an element with the following locator
(//button[@class="btn btn-link input-group-append input-group-text"])[1]
How can I use this in WebDriverIO syntax ??
I tried like this const date = await $('(//button[@class="btn btn-link input-group-append input-group-text"])[1]"')
But Getting this error:
[chrome 102.0.5005.115 windows #0-0] invalid selector: Unable to locate an element with the xpath expression (//button[@class="btn btn-link input-group-append input-group-text"])[1]" because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string '(//button[@class="btn btn-link input-group-append input-group-text"])[1]"' is not a valid XPath expression. (Session info: chrome=102.0.5005.115)
await $('(//button[@class="btn btn-link input-group-append input-group-text"])[1]')