Path: blob/main/tools/neteditTestFunctions/frames/delete.py
169678 views
# -*- coding: utf-8 -*-1# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2# Copyright (C) 2009-2025 German Aerospace Center (DLR) and others.3# This program and the accompanying materials are made available under the4# terms of the Eclipse Public License 2.0 which is available at5# https://www.eclipse.org/legal/epl-2.0/6# This Source Code may also be made available under the following Secondary7# Licenses when the conditions for such availability set forth in the Eclipse8# Public License 2.0 are satisfied: GNU General Public License, version 29# or later which is available at10# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later1213# @file delete.py14# @author Pablo Alvarez Lopez15# @date 28-05-251617# imports18import time19from ..enums.attributesEnum import attrs20from ..constants import DELAY_REMOVESELECTION, DELAY_QUESTION21from ..general.modes import changeMode22from ..input.keyboard import typeKey232425def delete():26"""27@brief delete using SUPR key28"""29typeKey('del')30# wait for GL Debug31time.sleep(DELAY_REMOVESELECTION)323334def protectElements():35"""36@brief Protect or unprotect delete elements37"""38# select delete mode again to set mode39changeMode("delete")40# jump to checkbox41for _ in range(attrs.frames.delete.protectElements):42typeKey('tab')43# type SPACE to change value44typeKey('space')454647def waitDeleteWarning():48"""49@brief close warning about automatically delete additionals50"""51# wait 0.5 second to question dialog52time.sleep(DELAY_QUESTION)53# press enter to close dialog54typeKey('enter')555657