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
- While recording, Architect will detect an iFrame and will highlight 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. - Clicking the button will record a contextswitch action in the Architect along with a pageinit for the iFrame.
- Clicking back to the main area of the site will record another contextswitch corresponding to the action taken.
- 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.
- From the Actions tab of the Test Case, expand the test step with the contextswitch action to see it displayed.
- This information is also viewable in the Slider View. Click the View Results button from the browser tab.
- 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.