Skip to content

Instantly share code, notes, and snippets.

Last active Sep 26, 2019
What would you like to do?
Shows how to handle and switch multiple tabs in Sencha Test
// WebDriver scenario URL:
describe('Switching tabs', function() {
var tabIds, driver;
beforeAll(function() {
// This stores a reference to the underlying driver object
driver = ST.defaultContext.driver;
it('should click a button that opens a second tab', function() {
ST.button('contentPanel button[text="Medium"]:first')
it('should fetch all open browser tabs', function(done) {
.then(function(tabs) {
tabIds = tabs;
it('should switch tabs to second tab', function() {
driver.switchTab(tabIds[1]).then(function() {
// Check definitely referencing correct page
ST.getUrl(function(url) {
it('should do something in the other tab', function() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment