In my test case, I am trying to click a button, if it exists on the page. My script for this looks like:
`
void clickEditButton() throws WebElementNotFoundException {
try {
WebUI.click(findTestObject(‘Object Repository/TableRowEditButton(TabbedPane)’))
}
catch (WebElementNotFoundException ex) {
WebUI.click(findTestObject(‘Object Repository/TableRowEditButton(General)’))
}
}
try {
clickEditButton()
}
catch (WebElementNotFoundException ex) {
break;
}
`
and for some reason, it’s failing with the “Unable to click on object” exception, even though I caught it. Even worse, when I go to the line number that failed, it’s the one inside the try block, inside clickEditButton.