Context Switch Action

Context Switch Action Overview

Context Switch is an action type created when switching contexts (to an iFrame, for example) during test creation. This kind of action is helpful when editing tests to ensure newly added actions are added into the appropriate context.

Add Context Switch Action in Architect

  1. While recording, the Architect will detect an iFrame and will highlight as a Pageinit with the Click to Enable iFrame button. Once selected, this will enable Context Switch
    Note: iFrames are not the only scenario where the Context Switch action will be automatically added to the test. Each application can use different Path values, which means that Context Switch action behavior can vary from this example. Please contact support if clarification is required. Errors with Paths can be tricky to diagnose without recreating the set of steps with Architect from Live Edit/Live Debug or with a new test.

  2. Clicking the button will record a context-switch action in the Architect along with a pageinit for the iFrame.

  3. Clicking back to the main area of the site will record another contextswitch corresponding to the action taken.
  4. Selecting the contextswitch action in the Architect will open details regarding the element.

View Context Switch on Existing Test

After you create the Test Case, you can see the contextswitch action in multiple areas.

  1. From the Actions tab of the Test Case, expand the test step with the contextswitch action to see it displayed. 
  2. This information is also viewable in the Slider View. Click the View button on the test action.
  3. Click the gear icon on the contextswitch action to display the details of the element.

NOTE: This action is added to Architect for visibility only. We do not recommend rearranging actions as the context switch and pageinit actions will be added automatically. Upon adding a next step, to move outside the iframe, Architect will add another contextswtich action to notate the move back to the main window.