// executes CloseWindow routine private void DoCloseWindow(ActionRule actionRule) { // exit conditions if (!int.TryParse(actionRule.Argument, out int indexOut)) { return; } WebDriver.CloseWindow(indexOut); }