Bug 937336 - Remove where possible explicit frame switching

Replacing explicit frame switching calls to use the encapsulated switch_to_displayed_app method