AppNeta - Browser Script (Selenium) and selectActiveWindow
search cancel

AppNeta - Browser Script (Selenium) and selectActiveWindow

book

Article ID: 247671

calendar_today

Updated On:

Products

AppNeta

Issue/Introduction

Web Apps in Experience may run into issues progressing the script properly when a newly spawned window/page appears.

Cause

Selenium by default will try to run it's commands/steps only in the original active window, we need to tell Selenium to change it's active window.

Resolution

The command selectActiveWindow exists to resolve such cases where a new Window/Tab/Page is brought up in the browser as part of the Experience Workflow.  selectActiveWindow has a couple of different methods of operation as described below.

When selectActiveWindow is added to the script without a numeric value in the Target field the command will select the most recently spawned window as it's target, this can be useful for temporary popups from SSO Authentication.

When selectActiveWindow is added to the script with a numeric value in the Target field the command will select the specified window.  The counting for this command starts at 0 meaning that the original page/window is 0 and any subsequent windows will be 1, 2, 3 etc.  This method is useful when you need to change the active window for a larger portion of the Experience Test.

Additional Information

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/appneta/GA/set-up-monitoring/experience-deploy/experience-scripting/experience-scripting-selenium-commands.html#title-appneta-supported-selenium-commands_appneta-specific-selenium-commands