I'm dealing with a code snippet
driver.findElement(By.cssSelector("#lmv-dialog-add-id-_newFundAllocation-targetAllocation-88-F03 >td.tright > a.lmv-show")).click();
The number 88 in the code is flexible. How can I adjust the code so it works regardless of whether it's 88, 99, 12, or any other number?
Furthermore, there are three XPath elements with similar naming:
id('lmv-dialog-add-id-_newFundAllocation-targetAllocation-88-F01')/x:td[3]/x:a
id('lmv-dialog-add-id-_newFundAllocation-targetAllocation-88-F02')/x:td[3]/x:a
id('lmv-dialog-add-id-_newFundAllocation-targetAllocation-88-F03')/x:td[3]/x:a
I need to click on the third item. The numerical value (88) here is variable and I want this action to work for any number that appears in its place.