Knowledge Base Article

Home Page > Knowledge Base > Rapise

Home Page > Knowledge Base > Rapise > Rapise Web

Article Testing Multiple Web Browser Tabs at Once in Chrome

by Adam S on Friday, August 26, 2016

Sometimes you have a web test where you need to test the contents of two browser tabs at the same time in Google Chrome. For example you may have an application which opens up a second browser tab and you want to test that changes in the second tab show up correctly in the first tab. This article describes how to perform this kind of testing.
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.

// ... Do some other work with tab 2 here...

// ... Do some other work with tab 1 here...


Article Info
Last Updated: 8/26/2016
Article ID: KB216
# Views: 273
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2017 | Licensed to Inflectra Corporation.