Path: blob/main/tools/neteditTestFunctions/general/overwrite.py
169679 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 overwrite.py14# @author Pablo Alvarez Lopez15# @date 28-05-251617# imports18import time19from ..constants import DELAY_QUESTION20from ..input.keyboard import typeKey, typeTwoKeys212223def overwritingAccept():24"""25@brief overwrite Element26"""27# simple type space, because is the default focused button28typeKey('space')29# wait some second to question dialog30time.sleep(DELAY_QUESTION)313233def overwritingCancel():34"""35@brief overwrite Element36"""37# go to no button38typeKey('tab')39# press cancel40typeKey('space')41# wait some second to question dialog42time.sleep(DELAY_QUESTION)434445def overwritingAbort():46"""47@brief abort overwriting48"""49# go to cancel button50for _ in range(2):51typeKey('tab')52# press cancel53typeKey('space')54# wait some second to question dialog55time.sleep(DELAY_QUESTION)565758def overwritingApplyToAll():59"""60@brief overwritte Element61"""62# go to check63typeTwoKeys('shift', 'tab')64# toggle check65typeKey('space')66# go back to accept buton67typeKey('tab')68# wait some second to question dialog69time.sleep(DELAY_QUESTION)707172