Rapise 7.3 and Higher
Navigator object has methods to create and switch between tabs:
Navigator.DoCreateTab - open URL in a new Tab
Navigator.DoSelectTab - select one of the currently open tabs.
Navigator.DoCreateWindow - create new browser window.
Navigator.DoActivateWindow - select an existing window.
Navigator.DoCloseWindow - close an active window.
So that working with multiple tabs is straight forward.
Older versions of Rapise
The attached test script has 2 utility functions in the .user.js file that should be used:
FindOrCreateChromeTabForObject and FindOrCreateChromeTabForTitle
- They are utility functions to enable cross-tab playback.
- The expected usage is the following:
- Suppose we have 2 objects 'inputButton1' belonging to one page and 'inputButton2' belonging to another.
- We want to have those buttons open on two tabs and switch between those tabs back and forth.
- In this case the solution is to call those functions passing pending object id, i.e. just before the script is about to start working with another tab.
Examples
FindOrCreateChromeTabForObject('inputButton2');
SeS('inputButton2').DoClick();
// ... Do some other work with tab 2 here...
FindOrCreateChromeTabForObject('inputButton1');
SeS('inputButton1').DoClick();
// ... Do some other work with tab 1 here...
FindOrCreateChromeTabForObject('inputButton2');
SeS('inputButton2').DoClick();