I'm trying to click on a button by the href value, the problem is that the value is variable. See an example below:
<a data-v-1615fd2d data-v-7c46ae33
href="/app/applications/2774009/applicants/3948813"
class="applicant-name btn btn-link obs-link">
</a>
The numbers in the href are different depending on which file I am trying to select. Currently, I am clicking buttons with href using the code below:
await page.click("a[href$='someValue']");
I would like to do something like this:
let applicationLink= "/app/applications/2774271/applicants/3949188";
await page.click("a[href$='${applicationLink}']");
Passing the variable into the page.click function.
But this doesn't seem to work.
I am new to this and don't have much experience. Would love some help. Feel free to ask any questions for clarification.