1. To address the review comment.
   - Make the paramater "options" as a structured object instead of a
     boolean.
2. Add unit test for this change to switchToFrame.