示例#1
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 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)
示例#2
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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)
示例#3
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 vaporizer
netedit.changeAdditional("vaporizer")

# create vaporizer
netedit.leftClick(match, 250, 120)

# go to inspect mode
netedit.inspectMode()

# inspect first vaporizer
netedit.leftClick(match, 310, 200)

# Change parameter 0 with a non valid value (dummy edge)
netedit.modifyAttribute(0, "dummyEdge")

# Change parameter 0 with a valid value (different edge)
netedit.modifyAttribute(0, "gneE0")
示例#4
0
文件: test.py 项目: hanmaokun/sumo_di
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)

# apply zoom
netedit.setZoom("25", "25", "25")

# go to additional mode
netedit.additionalMode()

# select E3
netedit.changeAdditional("e3Detector")

# create E3
netedit.leftClick(match, 250, 400)

# create second E3
netedit.leftClick(match, 350, 400)

# select exit detector
netedit.changeAdditional("detExit")

# Create Exit detector E3
netedit.selectAdditionalChild(6, 0)
netedit.leftClick(match, 200, 200)

# go to inspect mode
示例#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)

# apply zoom
netedit.setZoom("25", "0", "25")

# go to additional mode
netedit.additionalMode()

# select E3
netedit.changeAdditional("e3Detector")

# create E3 1
netedit.leftClick(match, 100, 50)

# create E3 2
netedit.leftClick(match, 200, 50)

# select entry detector
netedit.changeAdditional("detEntry")

# Create Entry detector for E3 3
netedit.selectAdditionalChild(6, 2)
netedit.leftClick(match, 75, 200)

# Create Entry detectors for E3 4
示例#6
0
import neteditTestFunctions as netedit

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

# apply zoom
netedit.zoomIn(match.getTarget().offset(325, 200), 10)

# Change to create additional
netedit.additionalMode()

# obtain match for comboboxAdditional
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select E3
netedit.changeAdditional(comboboxAdditional, 8)

# create E3 1
netedit.leftClick(match, 100, 100)

# create E3 2
netedit.leftClick(match, 300, 100)

# select entry detector
netedit.changeAdditional(comboboxAdditional, -4)

# Create Entry detectors for E3 2
netedit.selectChild(comboboxAdditional, 4, 3)
netedit.leftClick(match, 150, 250)

# Change to delete
示例#7
0
文件: test.py 项目: ikriz/sumo
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)

# apply zoom
netedit.setZoom("25", "0", "25")

# go to additional mode
netedit.additionalMode()

# select rerouter
netedit.changeAdditional("rerouter")

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

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

# go to delete mode
netedit.deleteMode()

# remove created rerouter
netedit.leftClick(match, 200, 100)

# remove loaded rerouter
netedit.leftClick(match, 300, 100)
示例#8
0
文件: test.py 项目: sinzi-test/sumo
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 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")
示例#9
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
neteditTestRoot = os.path.join(
    os.environ.get('TEXTTEST_HOME', testRoot), 'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit

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

# go to additional mode
netedit.additionalMode()

# select containerStop
netedit.changeAdditional("containerStop")

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

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

# change to move mode
netedit.moveMode()

# move containerStop to right
netedit.moveElement(match, 150, 275, 250, 275)

# go to inspect mode
netedit.inspectMode()
示例#10
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 parkingArea
netedit.changeAdditional("parkingArea")

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

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

# change to move mode
netedit.moveMode()

# move parkingArea to right
netedit.moveElement(match, 150, 275, 250, 275)

# go to inspect mode
netedit.inspectMode()
示例#11
0
文件: test.py 项目: MahmoudNawar/sumo
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot),
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit

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

# Change to create additional
netedit.additionalMode()

# obtain match for comboboxAdditional
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select containerStop
netedit.changeAdditional(comboboxAdditional, 3)

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

# Change to delete
netedit.deleteMode()

# delete created containerStop
netedit.leftClick(match, 260, 250)

# delete loaded containerStop
netedit.leftClick(match, 450, 250)

# Check undo redo
netedit.undo(match, 2)
示例#12
0
文件: test.py 项目: thecatfather/sumo
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 E1 Instant
netedit.changeAdditional("instantInductionLoop")

# create E1 Instant 1
netedit.leftClick(match, 250, 150)

# create E1 Instant 2
netedit.leftClick(match, 450, 150)

# go to inspect mode
netedit.inspectMode()

# inspect first E1 Instant
netedit.leftClick(match, 250, 150)

# Change parameter 0 with a non valid value (Duplicated ID)
netedit.modifyAttribute(0, "instantInductionLoop_gneE2_1_1")
示例#13
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 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)
示例#14
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 invalid additional (dummy)
netedit.changeAdditional("dummyAdditional")

# try to create an dummy additional
netedit.leftClick(match, 250, 250)

# select valid additional (busStop)
netedit.changeAdditional("busStop")

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

# save additionals
netedit.saveAdditionals()

# save newtork
netedit.saveNetwork()
示例#15
0
文件: test.py 项目: planetsumo/sumo
import neteditTestFunctions as netedit

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

# apply zoom 
netedit.zoomIn(match.getTarget().offset(325, 200), 10)

# Change to create additional
netedit.additionalMode()

# obtain match for comboboxAdditional
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select E3
netedit.changeAdditional(comboboxAdditional, 8)

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

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

# Change frequency
netedit.modifyAttribute(comboboxAdditional, 2, "150")

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

# Change timeTreshold
netedit.modifyAttribute(comboboxAdditional, 3, "5")
示例#16
0
文件: test.py 项目: sinzi-test/sumo
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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")

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

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

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

# go to inspect mode
netedit.inspectMode()

# inspect first busStop
netedit.leftClick(match, 250, 170)
示例#17
0
文件: test.py 项目: planetsumo/sumo
testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
neteditTestRoot = os.path.join(os.environ.get('TEXTTEST_HOME', testRoot), 'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit

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

# Change to create additional
netedit.additionalMode()

# obtain match for comboboxAdditional
comboboxAdditional = netedit.getComboBoxAdditional(match)

# select E1
netedit.changeAdditional(comboboxAdditional, 6)

# create E1
netedit.leftClick(match, 250, 250)

# change to move mode
netedit.moveMode()

# move E1 to right
netedit.moveElement(match, 120, 250, 250, 250)

# Change to inspect mode
netedit.inspectMode()

# inspect E1
netedit.leftClick(match, 350, 250)
示例#18
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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 calibrator
netedit.changeAdditional("laneCalibrator")

# 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)