BrowserTab Class

This class provides the API for the Tabs in the web browsers windows. Browser tabs can be identified using a multi-property name of the form {type='BrowserTab' title='AddressBook'}. Matching can be done on the BrowserTab.title or the BrowserTab.url property using either strict, wildcard or regular expression matching.

string BrowserTab.title

This read-only property holds the title of the web browsers tab.

string BrowserTab.url

This property holds the URL of the web browsers tab. Changing this property to a different URL will load the given URL in that browser tab and wait for the tab to be hooked up. Waiting for the hookup to succeed is limited by the Application Startup Time (or AUTTimeout) specified in the squishserver configuration. If you need more control over the timeout please consider using BrowserTab.setUrl(url, timeout).

BrowserTab.close()

This function closes the tab in the browser, possibly also closing the window if it is the last tab. After calling this function accessing the other properties on the same object will raise errors.

BrowserTab.setUrl(url, timeout)

This function changes the url in the tab to the url and waits for the new page to be hooked by Squish. The time to wait can be specified using the timeout parameter and has to be specified in milliseconds.

This function is provided as an alternative for the BrowserTab.url property in cases where the timeout should be specified explicitly instead of using the value that the url property picks up.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results