Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

How to add exception



How to add exception in synthetic

try {
$browser.driver.findElement(By.js(‘document.querySelector("#acsMainInvite > div > a.acsInviteButton.acsDeclineButton")’)).click();
} catch (WebDriverException ) { }

this is correct way to processed?


Hi, @csingapanga: You may find this post helpful:


Try if and else, if condition is true, it will execute, otherwise it will skip.


@singapangac - thanks for sharing that potential solution :smiley: