Inactive Tutor answered 03/18/19
Tutor
New to Wyzant
Look at it this way: "as expected" is a descriptive phrase that could be eliminated without substantially affecting the action-result information of "She tried and failed." As such, it is set off with commas by "She tried and, as expected, failed."