Skip to content

close_all_child_windows

roei sabag edited this page Jul 12, 2020 · 1 revision

Description

Close all open tabs/windows and switch to the main (first) window.

Scope

Web, Mobile Web or any other Web Driver implementation which implements Close Window.

Properties

None

Command Line Arguments (CLI)

None

W3C Web Driver Protocol

https://www.w3.org/TR/webdriver/#close-window

Examples

Example no. 1

Can be tested on

Close all open tabs/windows and switch to the main (first) window.

Action Rule (JSON)

{
    "action": "CloseAllChildWindows"
}

Rhino Literal

close all child windows

CSharp

// option no.1
var actionRule = new ActionRule
{
    Action = PluginsList.CloseAllChildWindows
};

// option no.2
var actionRule = new
{
    Action = "CloseAllChildWindows"
};

Python

action_rule = {
    "action": "CloseAllChildWindows"
}

Java Script

var actionRule = {
    action: "CloseAllChildWindows"
};

Java

ActionRule actionRule = new ActionRule()
        .setAction("CloseAllChildWindows");

Clone this wiki locally