froth-webdriverio-framework 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,6 +20,9 @@ async function switch2WindowByTitle(title) {
|
|
|
20
20
|
*/
|
|
21
21
|
async function switch2WindowByIndex(index) {
|
|
22
22
|
const handles = await browser.getWindowHandles();
|
|
23
|
+
console.log(`Total open windows: ${handles.length}`);
|
|
24
|
+
console.log(`Switching to window at index: ${index}`);
|
|
25
|
+
console.log(`Available handles: ${handles.join(', ')}`);
|
|
23
26
|
if (index < 0 || index >= handles.length) {
|
|
24
27
|
throw new Error(`Invalid window index: ${index}. There are only ${handles.length} windows open.`);
|
|
25
28
|
}
|