Example #1
0
File: test.py Project: wsxbjx/sumo
                               'netedit')
sys.path.append(neteditTestRoot)
import neteditTestFunctions as netedit  # noqa

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

# go to select mode
netedit.selectMode()

# try to select node gneJ0 and delete it (Error in type of element)
netedit.focusOnFrame()
for x in range(0, 5):
    netedit.typeTab()
# paste the new elementClass
netedit.pasteIntoTextField("dummyElement")
# set elementClass
netedit.typeEnter()

# try to select node gneJ0 and delete it (Error in type of element)
netedit.focusOnFrame()
for x in range(0, 5):
    netedit.typeTab()
# paste the new elementClass
netedit.pasteIntoTextField("Net Element")
# jump to element
for x in range(0, 2):
    netedit.typeTab()
# paste the new elementType
netedit.pasteIntoTextField("dummyType")
# type tab to set elementType
Example #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 select mode
netedit.selectMode()

# select all edges that allow passengers
netedit.selectItems("Net Element", "edge", "allow", "passenger")

# save selection
netedit.focusOnFrame()
for x in range(0, 16):
    netedit.typeTab()
netedit.typeSpace()
# jump to filename textfield
netedit.typeTwoKeys("f", Key.ALT)
filename = os.path.join(netedit.textTestSandBox, "selection.txt")
netedit.pasteIntoTextField(filename)
netedit.typeEnter()

# quit netedit
netedit.quit(neteditProcess, True)