Bug 1103803 - Cannot call method in 'expect' section' of Test Scenario

(cherry picked from commit 59c0e998beff973769de4acdc214fbb40bd306d4)