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

synthetics-script

#1

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?


#2

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


#3

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


#4

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