Exemple #1
0
netedit.modifyAttribute(3, "120")

# Change parameter 4 with an empty value
netedit.modifyAttribute(4, "")

# Change parameter 4 with an non valid value
netedit.modifyAttribute(4, "%%%&&%$%$")

# Change parameter 4 with a duplicated value
netedit.modifyAttribute(4, "e1Detector_gneE2_1_1.txt")

# Change parameter 4 with a valid value
netedit.modifyAttribute(4, "myOwnOutput.txt")

# Change parameter 5
netedit.modifyAdditionalDefaultValue(5, "private passenger taxi bus")

# Change boolean parameter 5
netedit.modifyBoolAttribute(6)

# Check undos and redos
netedit.undo(match, 12)
netedit.redo(match, 12)

# save additionals
netedit.saveAdditionals()

# save network
netedit.saveNetwork()

# quit netedit
Exemple #2
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select parkingArea
netedit.changeAdditional("parkingArea")

# create parkingArea in mode "reference left"
netedit.leftClick(match, 250, 250)

# set invalid roadSideCapacity (dummy)
netedit.modifyAdditionalDefaultValue(2, "dummyRoadSideCapacity")

# try to create parkingArea in mode "reference left"
netedit.leftClick(match, 260, 250)

# set invalid roadSideCapacity (empty"
netedit.modifyAdditionalDefaultValue(2, "")

# try to create parkingArea in mode "reference left"
netedit.leftClick(match, 260, 250)

# set invalid roadSideCapacity (negative)
netedit.modifyAdditionalDefaultValue(2, "-3")

# try to create parkingArea in mode "reference left"
netedit.leftClick(match, 260, 250)
Exemple #3
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E2
netedit.changeAdditional("e2Detector")

# create E2 with default parameters
netedit.leftClick(match, 125, 250)

# set invalid  lenght
netedit.modifyAdditionalDefaultValue(2, "-12")

# try to create E2 with different lenght
netedit.leftClick(match, 250, 250)

# set valid lenght
netedit.modifyAdditionalDefaultValue(2, "5")

# create E2 with different lenght
netedit.leftClick(match, 250, 250)

# set invalid frequency
netedit.modifyAdditionalDefaultValue(3, "-30")

# try to create a E2 with different frequency
netedit.leftClick(match, 350, 250)
Exemple #4
0
netedit.setZoom("25", "0", "25")

# go to additional mode
netedit.additionalMode()

# select E3
netedit.changeAdditional("e3Detector")

# create E3 with default parameters (will not be writed)
netedit.leftClick(match, 100, 100)

# create E3 with default parameters
netedit.leftClick(match, 200, 100)

# set invalid frequency
netedit.modifyAdditionalDefaultValue(2, "-30")

# try to create E3 with different frequency
netedit.leftClick(match, 300, 100)

# set valid frequency
netedit.modifyAdditionalDefaultValue(2, "150")

# create E3 with different frequency
netedit.leftClick(match, 300, 100)

# set invalid timeTreshold
netedit.modifyAdditionalDefaultValue(3, "-4")

# try to create E3 with different timeTreshold
netedit.leftClick(match, 400, 100)
Exemple #5
0
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select chargingStation
netedit.changeAdditional("chargingStation")

# change reference to center
netedit.modifyAdditionalDefaultValue(9, "reference center")

# create chargingStation 1 in mode "reference center"
netedit.leftClick(match, 250, 150)

# create chargingStation 2 in mode "reference center"
netedit.leftClick(match, 450, 150)

# go to inspect mode
netedit.inspectMode()

# inspect first chargingStation
netedit.leftClick(match, 250, 170)

# Change parameter 0 with a non valid value (Duplicated ID)
netedit.modifyAttribute(0, "chargingStation_gneE2_1_1")
Exemple #6
0
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select busStop
netedit.changeAdditional("busStop")

# set name
netedit.modifyAdditionalDefaultValue(2, "busStop")

# set friendlyPos
netedit.modifyAdditionalDefaultBoolValue(3)

# Add three extra lines
netedit.modifyStoppingPlaceLines(5, 3)

# fill extra lines
netedit.fillStoppingPlaceLines(4, 4)

# remove last line (line 4)
netedit.modifyStoppingPlaceLines(9, 1)

# create busStop in mode "reference left"
netedit.leftClick(match, 250, 250)
Exemple #7
0
# select Access detector
netedit.changeAdditional("access")

# try to create Access without select child
netedit.leftClick(match, 50, 200)

# Create Access detector
netedit.selectAdditionalChild(7, 0)
netedit.leftClick(match, 50, 200)

# Try to create another Access in the same edge
netedit.selectAdditionalChild(7, 0)
netedit.leftClick(match, 200, 200)

# set invalid lenght
netedit.modifyAdditionalDefaultValue(2, "dummyLenght")

# set invalid lenght
netedit.modifyAdditionalDefaultValue(2, "-4")

# Try to create Access
netedit.leftClick(match, 50, 250)

# set valid lenght
netedit.modifyAdditionalDefaultValue(2, "3.5")

# change friendly position
netedit.modifyAdditionalDefaultBoolValue(3)

# Create access
netedit.leftClick(match, 50, 250)
Exemple #8
0
netedit.modifyAttribute(0, "120")

# Change parameter 1 with an empty value
netedit.modifyAttribute(1, "")

# Change parameter 1 with an non valid value
netedit.modifyAttribute(1, "%%%&&%$%$")

# Change parameter 1 with a duplicated value
netedit.modifyAttribute(1, "instantInductionLoop_gneE2_1_1.txt")

# Change parameter 1 with a valid value
netedit.modifyAttribute(1, "myOwnOutput.txt")

# Change parameter 2 with an invalid value
netedit.modifyAdditionalDefaultValue(2, "DummyVClasses")

# Change parameter 2
netedit.modifyAdditionalDefaultValue(2, "private passenger taxi bus")

# Change boolean parameter 3
netedit.modifyBoolAttribute(3)

# Check undos and redos
netedit.undo(match, 4)
netedit.redo(match, 4)

# save additionals
netedit.saveAdditionals()

# save network
Exemple #9
0
netedit.additionalMode()

# select rerouter
netedit.changeAdditional("rerouter")

# try to create rerouter without edge child (Warning)
netedit.leftClick(match, 100, 100)

# select edge child
netedit.selectAdditionalChild(10, 0)

# create rerouter with default parameters
netedit.leftClick(match, 200, 100)

# set invalid filename
netedit.modifyAdditionalDefaultValue(2, "$$$$$$$$")

# try to create rerouter with invalid filename
netedit.leftClick(match, 300, 100)

# set valid filename
netedit.modifyAdditionalDefaultValue(2, "myOwnFilename.txt")

# create rerouter with valid filename
netedit.leftClick(match, 300, 100)

# set invalid probability
netedit.modifyAdditionalDefaultValue(3, "2")

# try to create rerouter with invalid probability
netedit.leftClick(match, 400, 100)
Exemple #10
0
# select space
netedit.changeAdditional("space")

# try to create space without selecting Parking Area parent
netedit.leftClick(match, 250, 100)

# select parent
netedit.selectAdditionalChild(9, 0)

# create space
netedit.leftClick(match, 250, 100)

# set invalid z (dummy)
netedit.selectAdditionalChild(9, 0)
netedit.modifyAdditionalDefaultValue(2, "dummyZ")

# try to create space
netedit.leftClick(match, 260, 100)

# set invalid z (empty)
netedit.modifyAdditionalDefaultValue(2, "")

# try to create space
netedit.leftClick(match, 260, 100)

# set valid z (negative)
netedit.modifyAdditionalDefaultValue(2, "-2")

# create space
netedit.leftClick(match, 260, 100)
Exemple #11
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E1
netedit.changeAdditional("e1Detector")

# create E1 with default parameters
netedit.leftClick(match, 200, 250)

# set a invalid  frequency (dummy)
netedit.modifyAdditionalDefaultValue(2, "dummyFrequency")

# try to create E1 with invalid frequency
netedit.leftClick(match, 250, 250)

# set a invalid  frequency
netedit.modifyAdditionalDefaultValue(2, "-30")

# try to create E1 with invalid frequency
netedit.leftClick(match, 250, 250)

# set a valid frequency
netedit.modifyAdditionalDefaultValue(2, "150")

# try to create E1 with valid frequency
netedit.leftClick(match, 250, 250)
Exemple #12
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E2
netedit.changeAdditional("e2Detector")

# create E2 with default parameters
netedit.leftClick(match, 125, 250)

# set invalid  lenght
netedit.modifyAdditionalDefaultValue(2, "-12")

# try to create E2 with different lenght
netedit.leftClick(match, 250, 250)

# set valid lenght
netedit.modifyAdditionalDefaultValue(2, "5")

# create E2 with different lenght
netedit.leftClick(match, 250, 250)

# set invalid frequency
netedit.modifyAdditionalDefaultValue(3, "-30")

# try to create a E2 with different frequency
netedit.leftClick(match, 350, 250)
Exemple #13
0
import neteditTestFunctions as netedit

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot, False)

# go to additional mode
netedit.additionalMode()

# select E1
netedit.changeAdditional("e1Detector")

# create E1 with default parameters
netedit.leftClick(match, 200, 250)

# Change frequency
netedit.modifyAdditionalDefaultValue(2, "150")

# create E1 with different frequency
netedit.leftClick(match, 250, 250)

# Change frequency
netedit.modifyAdditionalDefaultBoolValue(3)

# create E1 with different split by type
netedit.leftClick(match, 300, 250)

# Check undo redo
netedit.undo(match, 3)
netedit.redo(match, 3)

# save additionals
Exemple #14
0
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select routeProbe
netedit.changeAdditional("routeProbe")

# create routeProbe (camera will be moved)
netedit.leftClick(match, 250, 220)

# create another routeProbe with the same default attributes (camera will be moved)
netedit.leftClick(match, 250, 220)

# set invalid frequency
netedit.modifyAdditionalDefaultValue(2, "-20")

# try to create routeProbe
netedit.leftClick(match, 250, 220)

# set valid default frequency
netedit.modifyAdditionalDefaultValue(2, "120")

# create routeProbe (camera will be moved)
netedit.leftClick(match, 250, 220)

# set invalid default begin
netedit.modifyAdditionalDefaultValue(3, "-11")

# try to create routeProbe
netedit.leftClick(match, 250, 220)
Exemple #15
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select E1
netedit.changeAdditional("e1Detector")

# create E1 with default parameters
netedit.leftClick(match, 200, 250)

# set a invalid  frequency
netedit.modifyAdditionalDefaultValue(2, "-30")

# try to create E1 with different frequency
netedit.leftClick(match, 250, 250)

# set a valid frequency
netedit.modifyAdditionalDefaultValue(2, "150")

# create E1 with different frequency
netedit.leftClick(match, 250, 250)

# set different vehicle type
netedit.modifyAdditionalDefaultValue(3, "private passenger taxi bus")

# create E1 with different split by type
netedit.leftClick(match, 300, 250)
Exemple #16
0
netedit.additionalMode()

# select rerouter
netedit.changeAdditional("rerouter")

# try to create rerouter without edge child (Warning)
netedit.leftClick(match, 100, 100)

# select edge child
netedit.selectAdditionalChild(8, 0)

# create rerouter with default parameters
netedit.leftClick(match, 200, 100)

# set invalid probability
netedit.modifyAdditionalDefaultValue(2, "2")

# try to create rerouter with different frequency
netedit.leftClick(match, 300, 100)

# set valid probability
netedit.modifyAdditionalDefaultValue(2, "0.3")

# create rerouter with different probability
netedit.leftClick(match, 300, 100)

# change off
netedit.modifyAdditionalDefaultBoolValue(3)

# try to create rerouter with different timeTreshold
netedit.leftClick(match, 400, 100)
Exemple #17
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select calibrator
netedit.changeAdditional("calibrator")

# create calibrator
netedit.leftClick(match, 240, 250)

# change position with an invalid value (dummy)
netedit.modifyAdditionalDefaultValue(2, "dummyValue")

# create calibrator with an invalid parameter (Default value will be used)
netedit.leftClick(match, 400, 215)

# change position with an invalid value (negative)
netedit.modifyAdditionalDefaultValue(2, "-5")

# create calibrator with an invalid parameter (Default value will be used)
netedit.leftClick(match, 400, 215)

# change position with n valid value
netedit.modifyAdditionalDefaultValue(2, "10")

# create calibrator with an invalid parameter (Default value will be used)
netedit.leftClick(match, 400, 215)
Exemple #18
0
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select vaporizer
netedit.changeAdditional("vaporizer")

# create vaporizer (camera will be moved)
netedit.leftClick(match, 250, 220)

# create another vaporizer with the same default attributes (camera will be moved)
netedit.leftClick(match, 250, 220)

# set invalid start
netedit.modifyAdditionalDefaultValue(2, "-12")

# try to create vaporizer
netedit.leftClick(match, 250, 220)

# set valid start
netedit.modifyAdditionalDefaultValue(2, "10")

# create vaporizer (camera will be moved)
netedit.leftClick(match, 250, 220)

# set invalid end
netedit.modifyAdditionalDefaultValue(3, "-20")

# try to create create vaporizer
netedit.leftClick(match, 250, 220)
Exemple #19
0
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select chargingStation
netedit.changeAdditional("chargingStation")

# set name
netedit.modifyAdditionalDefaultValue(2, "chargingStation")

# set friendlyPos
netedit.modifyAdditionalDefaultBoolValue(3)

# set invalid charging power
netedit.modifyAdditionalDefaultValue(4, "-200")

# try to create chargingStation in mode "reference left"
netedit.leftClick(match, 250, 250)

# set valid charging power
netedit.modifyAdditionalDefaultValue(4, "12000")

# create chargingStation in mode "reference left"
netedit.leftClick(match, 250, 250)
Exemple #20
0
import neteditTestFunctions as netedit

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot, False)

# go to additional mode
netedit.additionalMode()

# select chargingStation
netedit.changeAdditional("chargingStation")

# create chargingStation in mode "reference left"
netedit.leftClick(match, 250, 250)

# change reference to right
netedit.modifyAdditionalDefaultValue(7, "reference right")

# create chargingStation in mode "reference right"
netedit.leftClick(match, 240, 250)

# change reference to center
netedit.modifyAdditionalDefaultValue(7, "reference center")

# create chargingStation in mode "reference center"
netedit.leftClick(match, 425, 250)

# return to mode "reference left"
netedit.modifyAdditionalDefaultValue(7, "reference left")

# Change length
netedit.modifyAdditionalDefaultValue(9, "30")
Exemple #21
0
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select busStop
netedit.changeAdditional("busStop")

# set name
netedit.modifyAdditionalDefaultValue(2, "busStopName")

# set friendlyPos
netedit.modifyAdditionalDefaultBoolValue(3)

# create busStop in mode "reference left"
netedit.leftClick(match, 250, 250)

# set own lines
netedit.modifyAdditionalDefaultValue(4, "lineA lineB")

# create busStop in mode "reference left"
netedit.leftClick(match, 240, 250)

# change reference to right
netedit.modifyAdditionalDefaultValue(6, "reference right")
Exemple #22
0
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select busStop
netedit.changeAdditional("busStop")

# set invalid reference (dummy)
netedit.modifyAdditionalDefaultValue(8, "dummy reference")

# try to create busStop with the dummy reference
netedit.leftClick(match, 240, 250)

# set valid reference
netedit.modifyAdditionalDefaultValue(8, "reference right")

# create busStop with the valid reference
netedit.leftClick(match, 300, 250)

# save additionals
netedit.saveAdditionals()

# save newtork
netedit.saveNetwork()
Exemple #23
0
import neteditTestFunctions as netedit  # noqa

# Open netedit
neteditProcess, match = netedit.setupAndStart(neteditTestRoot)

# go to additional mode
netedit.additionalMode()

# select calibrator
netedit.changeAdditional("calibrator")

# create calibrator
netedit.leftClick(match, 240, 250)

# change frequency with an invalid value (dummy)
netedit.modifyAdditionalDefaultValue(2, "dummyValue")

# create calibrator with an invalid parameter (Default value will be used)
netedit.leftClick(match, 400, 215)

# change frequency with an invalid value (negative)
netedit.modifyAdditionalDefaultValue(2, "-30")

# create calibrator with an invalid parameter (Default value will be used)
netedit.leftClick(match, 400, 215)

# change frequency with a valid value
netedit.modifyAdditionalDefaultValue(2, "250")

# create calibrator with a valid parameter in other lane
netedit.leftClick(match, 400, 180)