def test(): jsxe.setStartingFiles([['Untitled-1']]) jsxe.setView('Source View') click('Tools') click('Options...') window('Global Options') click('JTree', '//jsxe/XML Document Options') combobox.setValue('IndentComboBox', '3') select('Soft tabs #{emulated with spaces#}', 'true') click('OK') close() sourceview.setText('') click('TextAreaPainter') keystroke('Tab') sourceview.assertText(' ') click('Tools') click('Options...') window('Global Options') click('JTree', '//jsxe/XML Document Options') combobox.setValue('IndentComboBox','8') click('OK') close() sourceview.setText('') click('TextAreaPainter') keystroke('Tab') sourceview.assertText(' ') close()
def test(): jsxe.setStartingFiles([['schema-test.xml']]) treeview.assertTree([ [ 'Document Root', 'doc', 'para' ] ]) treeview.expand('/Document Root/doc') click('Tools') click('Options...') window('Global Options') select('Validate if DTD or Schema Available', 'true') select('Format XML output', 'true') select('Soft tabs #{emulated with spaces#}', 'true') click('OK') close() treeview.expand('/Document Root/doc') treeview.removeNode('/Document Root/doc/para') treeview.assertTree([ [ 'Document Root', 'doc' ] ]) treeview.addElementNodeByName('/Document Root/doc', "para") window('Edit Node') select('EditTagDialog$AttributeTable', 'true', 'Set,0') select('EditTagDialog$AttributeTable', 'center', 'Value,0') click('OK') close() treeview.choose('/Document Root/doc/para') treeview.assertTree([ [ 'Document Root', 'doc', 'para' ] ]) treeview.assertAttributes([ ['align', 'center'] ]) close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.renameNode('/Document Root/default_element', 'renamed_element') treeview.assertTree([['Document Root', 'renamed_element', 'default_node']]) jsxe.setView('Source View') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <renamed_element>default_node</renamed_element>""") close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.choose('/Document Root/default_element/default_node') treeview.setValue('This is a test') treeview.assertTree([ [ 'Document Root', 'default_element', 'This is a test' ] ]) jsxe.setView('Source View') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element>This is a test</default_element>""") close()
def test(): jsxe.setStartingFiles( [['penguins.xml', 'multi-test.xml', 'entity-test.xml']]) jsxe.selectFile('penguins.xml') jsxe.closeFileByName('penguins.xml') jsxe.closeFileByName('multi-test.xml') jsxe.closeFileByName('entity-test.xml') jsxe.openRecentFile('penguins.xml') jsxe.openRecentFile('multi-test.xml') jsxe.openRecentFile('entity-test.xml') close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.choose('/Document Root/default_element') treeview.addAttribute('test1', '123') treeview.assertAttributes([['test1', '123']]) treeview.addAttribute('test2', '124') treeview.assertAttributes([['test1', '123'], ['test2', '124']]) treeview.removeAttribute(0) treeview.assertAttributes([['test2', '124']]) treeview.setAttribute('blah', '1234', 0) treeview.assertAttributes([['blah', '1234']]) close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.addElementNode('/Document Root/default_element') treeview.assertTree( [['Document Root', 'default_element', 'default_node', 'new_element']]) treeview.addCDATANode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'default_node', 'new_element', 'New CDATA Section' ]]) treeview.addPINode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'default_node', 'new_element', 'New CDATA Section', 'Instruction' ]]) treeview.addCommentNode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'default_node', 'new_element', 'New CDATA Section', 'Instruction', 'New Comment' ]]) treeview.addTextNode('/Document Root/default_element/new_element') treeview.assertTree([[ 'Document Root', 'default_element', 'default_node', 'new_element', 'New Text Node', 'New CDATA Section', 'Instruction', 'New Comment' ]]) treeview.removeNode('/Document Root/default_element/New CDATA Section') treeview.assertTree([[ 'Document Root', 'default_element', 'default_node', 'new_element', 'New Text Node', 'Instruction', 'New Comment' ]]) treeview.removeNode('/Document Root/default_element/new_element') treeview.assertTree([[ 'Document Root', 'default_element', 'default_node', 'Instruction', 'New Comment' ]]) treeview.removeNode('/Document Root/default_element/Instruction') treeview.assertTree( [['Document Root', 'default_element', 'default_node', 'New Comment']]) close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.assertTree([['Document Root', 'default_element']]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([['Document Root', 'default_element', 'new_element']]) treeview.addTextNode('/Document Root/default_element') treeview.assertTree( [['Document Root', 'default_element', 'new_element', 'New Text Node']]) treeview.addCDATANode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'new_element', 'New Text Node', 'New CDATA Section' ]]) treeview.addPINode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'new_element', 'New Text Node', 'New CDATA Section', 'Instruction' ]]) treeview.addCommentNode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'new_element', 'New Text Node', 'New CDATA Section', 'Instruction', 'New Comment' ]]) treeview.addAttribute('TEST', 'TEST2') treeview.assertAttributes([['TEST', 'TEST2']]) click('File') click('Reload') window('Document Modified') click('Yes') close() treeview.choose('/Document Root/default_element') treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.assertAttributes([]) close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.assertTree([['Document Root', 'default_element']]) treeview.addCDATANode('/Document Root/default_element') treeview.assertTree( [['Document Root', 'default_element', 'New CDATA Section']]) treeview.choose('/Document Root/default_element/New CDATA Section') treeview.setValue('CDATA Test 123 ]') treeview.assertTree( [['Document Root', 'default_element', 'CDATA Test 123 ]']]) jsxe.setView('Source View') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element><![CDATA[CDATA Test 123 ]]]></default_element>""") close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.assertTree([['Document Root', 'default_element']]) treeview.addPINode('/Document Root/default_element') treeview.assertTree([['Document Root', 'default_element', 'Instruction']]) treeview.renameNode('/Document Root/default_element/Instruction', 'SQLSELECT') treeview.assertTree([['Document Root', 'default_element', 'SQLSELECT']]) treeview.choose('/Document Root/default_element/SQLSELECT') treeview.setValue('SELECT * FROM BLAH') jsxe.setView('Source View') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element><?SQLSELECT SELECT * FROM BLAH?></default_element>""") close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) jsxe.setView('Source View') click('Edit') click('Find...') window('Search and Replace') select('FindComboBox', 'default') click('Find') jsxe.jsxewindow('Untitled-1') sourceview.assertSelectedText('default') window('Search and Replace') click('Find') jsxe.jsxewindow('Untitled-1') sourceview.assertSelectedText('default') window('Search and Replace') click('Find') jsxe.jsxewindow('Untitled-1') sourceview.assertSelectedText('default') window('Search and Replace') click('Cancel') close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) jsxe.setView('Source View') sourceview.setText('''<?xml version="1.0" encoding="UTF-8"?> <root> <text_element>Text</text_element> <cdata_element> <![CDATA[CDATA]]> </cdata_element> <pi_element> <?Instruction New Processing Instruction?> </pi_element> <comment_element> <!--comment--> </comment_element> </root>''') jsxe.setView('Tree View') treeview.assertTree([ [ 'Document Root', 'root', 'text_element', 'Text', 'cdata_element', 'CDATA', 'pi_element', 'Instruction', 'comment_element', 'comment' ] ]) close()
def test(): # rename default_element to differentiate files jsxe.setStartingFiles([['Untitled-1']]) treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-1') treeview.assertTree([['Document Root', 'untitled-1', 'default_node']]) jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-2') treeview.assertTree([['Document Root', 'untitled-2', 'default_node']]) jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-3') treeview.assertTree([['Document Root', 'untitled-3', 'default_node']]) jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-4') treeview.assertTree([['Document Root', 'untitled-4', 'default_node']]) jsxe.closeDirtyFileByName('Untitled-2') jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-5') treeview.assertTree([['Document Root', 'untitled-5', 'default_node']]) jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-6') treeview.assertTree([['Document Root', 'untitled-6', 'default_node']]) jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-7') treeview.assertTree([['Document Root', 'untitled-7', 'default_node']]) jsxe.selectFile('Untitled-5') jsxe.closeDirtyFile() jsxe.newFile() treeview.assertTree([['Document Root', 'default_element', 'default_node']]) treeview.renameNode('/Document Root/default_element', 'untitled-8') treeview.assertTree([['Document Root', 'untitled-8', 'default_node']]) jsxe.closeDirtyFileByName('Untitled-7') jsxe.closeDirtyFile() # Tests jsxe.selectFile('Untitled-1') treeview.assertTree([['Document Root', 'untitled-1', 'default_node']]) jsxe.selectFile('Untitled-3') treeview.assertTree([['Document Root', 'untitled-3', 'default_node']]) jsxe.selectFile('Untitled-4') treeview.assertTree([['Document Root', 'untitled-4', 'default_node']]) jsxe.selectFile('Untitled-6') treeview.assertTree([['Document Root', 'untitled-6', 'default_node']]) close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.assertTree([ [ 'Document Root', 'default_element' ] ]) treeview.choose('/Document Root/default_element') treeview.assertAttributes([ ]) treeview.addAttribute('test', 'junk') treeview.assertAttributes([ [ 'test', 'junk' ] ]) treeview.addAttribute('test2', 'test Attribute') treeview.assertAttributes([ [ 'test', 'junk' ], [ 'test2', 'test Attribute' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element1') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1' ] ]) treeview.addTextNode('/Document Root/default_element/element1') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element2') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2' ] ]) treeview.addTextNode('/Document Root/default_element/element2') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element3') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3' ] ]) treeview.addCDATANode('/Document Root/default_element/element3') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'New CDATA Section' ] ]) treeview.choose('/Document Root/default_element/element3/New CDATA Section') treeview.setValue('Test CDATA') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA' ] ]) treeview.addPINode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction' ] ]) treeview.choose('/Document Root/default_element/Instruction') treeview.setValue('Test Instruction') treeview.addCommentNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction', 'New Comment' ] ]) treeview.choose('/Document Root/default_element/New Comment') treeview.setValue('TEST COMMENT') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction', 'TEST COMMENT' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction', 'TEST COMMENT', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element4') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction', 'TEST COMMENT', 'element4' ] ]) treeview.addElementNode('/Document Root/default_element/element4') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction', 'TEST COMMENT', 'element4', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/element4/new_element', 'element5') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New Text Node', 'element3', 'Test CDATA', 'Instruction', 'TEST COMMENT', 'element4', 'element5' ] ]) click('Tools') click('Options...') window('Global Options') click('JTree', '//jsxe/XML Document Options') select('Format XML output', 'true') select('Soft tabs #{emulated with spaces#}', 'false') click('OK') close() jsxe.setView('Source View') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element test="junk" test2="test Attribute"> <element1>New Text Node</element1> <element2>New Text Node</element2> <element3><![CDATA[Test CDATA]]></element3> <?Instruction Test Instruction?> <!--TEST COMMENT--> <element4> <element5/> </element4> </default_element>""") close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.addElementNode('/Document Root/default_element') treeview.addElementNode('/Document Root/default_element') treeview.addElementNode('/Document Root/default_element') click('Tools') click('Options...') window('Global Options') click('JTree', '//jsxe/XML Document Options') select('Format XML output', 'true') click('OK') close() jsxe.setView('Source View') click('Edit') click('Find...') window('Search and Replace') select('FindComboBox', 'new_element') select('ReplaceComboBox', 'element1') # for some reason we need this to for combo box to update selected content click('ReplaceComboBox') # sleep(30); click('Replace&Find') #this should do nothing window('jsXe - Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element> <new_element/> <new_element/> <new_element/> </default_element>""") window('Search and Replace') click('Replace&Find') window('jsXe - Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element> <element1/> <new_element/> <new_element/> </default_element>""") window('Search and Replace') click('Replace&Find') window('jsXe - Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element> <element1/> <element1/> <new_element/> </default_element>""") window('Search and Replace') click('Replace&Find') window('jsXe - Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element> <element1/> <element1/> <element1/> </default_element>""") window('Search and Replace') click('Replace&Find') # should do nothing window('jsXe - Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <default_element> <element1/> <element1/> <element1/> </default_element>""") click('Cancel') close() close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.assertTree([['Document Root', 'default_element']]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([['Document Root', 'default_element', 'new_element']]) treeview.renameNode('/Document Root/default_element/new_element', 'element1') treeview.assertTree([['Document Root', 'default_element', 'element1']]) treeview.addElementNode('/Document Root/default_element/element1') treeview.assertTree( [['Document Root', 'default_element', 'element1', 'new_element']]) treeview.renameNode('/Document Root/default_element/element1/new_element', 'element2') treeview.assertTree( [['Document Root', 'default_element', 'element1', 'element2']]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'new_element' ]]) treeview.renameNode('/Document Root/default_element/new_element', 'element3') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3' ]]) treeview.addTextNode('/Document Root/default_element/element3') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node' ]]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'new_element' ]]) treeview.renameNode('/Document Root/default_element/new_element', 'element4') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4' ]]) treeview.addCDATANode('/Document Root/default_element/element4') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section' ]]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section', 'new_element' ]]) treeview.renameNode('/Document Root/default_element/new_element', 'element5') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section', 'element5' ]]) treeview.addPINode('/Document Root/default_element/element5') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section', 'element5', 'Instruction' ]]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section', 'element5', 'Instruction', 'new_element' ]]) #doubleclick('JScrollPane$ScrollBar.') #doubleclick('JScrollPane$ScrollBar.') treeview.renameNode('/Document Root/default_element/new_element', 'element6') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section', 'element5', 'Instruction', 'element6' ]]) treeview.addCommentNode('/Document Root/default_element/element6') treeview.assertTree([[ 'Document Root', 'default_element', 'element1', 'element2', 'element3', 'New Text Node', 'element4', 'New CDATA Section', 'element5', 'Instruction', 'element6', 'New Comment' ]]) #doubleclick('JScrollPane$ScrollBar.') jsxe.setView('Source View') sourceview.assertText('''<?xml version="1.0" encoding="UTF-8"?> <default_element><element1><element2/></element1><element3>New Text Node</element3><element4><![CDATA[New CDATA Section]]></element4><element5><?Instruction New Processing Instruction?></element5><element6><!--New Comment--></element6></default_element>''' )
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.addElementNode('/Document Root/default_element') treeview.renameNode('/Document Root/default_element/new_element', 'Default') treeview.addElementNode('/Document Root/default_element') treeview.renameNode('/Document Root/default_element/new_element', 'default') jsxe.setView('Source View') click('Edit') click('Find...') window('Search and Replace') select('FindComboBox', 'Default') select('ReplaceComboBox', 'test1') # for some reason we need this for combo box to update selected content click('ReplaceComboBox') select('Ignore Case', 'true') click('Find') select('FindComboBox', 'default') click('FindComboBox') select('Ignore Case', 'false') click('Replace&Find') jsxe.jsxewindow('Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <test1_element><Default/><default/></default_element>""") window('Search and Replace') select('FindComboBox', 'Default') select('ReplaceComboBox', 'test2') click('ReplaceComboBox') select('Ignore Case', 'true') click('Replace&Find') jsxe.jsxewindow('Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <test1_element><Default/><test2/></default_element>""") window('Search and Replace') select('ReplaceComboBox', 'test3') click('ReplaceComboBox') click('Replace&Find') jsxe.jsxewindow('Untitled-1') sourceview.assertText("""<?xml version="1.0" encoding="UTF-8"?> <test1_element><Default/><test2/></test3_element>""") click('Cancel') close() close()
def test(): jsxe.setStartingFiles([['Untitled-1']]) treeview.expand('/Document Root/default_element') treeview.removeNode('/Document Root/default_element/default_node') treeview.assertTree([ [ 'Document Root', 'default_element' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element1') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1' ] ]) treeview.addTextNode('/Document Root/default_element/element1') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node' ] ]) treeview.addCommentNode('/Document Root/default_element/element1') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element2') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2' ] ]) treeview.addCDATANode('/Document Root/default_element/element2') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section' ] ]) treeview.addCommentNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'New Comment' ] ]) treeview.choose('/Document Root/default_element/New Comment') treeview.setValue('Comment Node') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node' ] ]) treeview.addElementNode('/Document Root/default_element') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/new_element', 'element3') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3' ] ]) treeview.addElementNode('/Document Root/default_element/element3') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3', 'new_element' ] ]) treeview.renameNode('/Document Root/default_element/element3/new_element', 'element4') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3', 'element4' ] ]) treeview.addCDATANode('/Document Root/default_element/element3/element4') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3', 'element4', 'New CDATA Section' ] ]) treeview.addCommentNode('/Document Root/default_element/element3/element4') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3', 'element4', 'New CDATA Section', 'New Comment' ] ]) treeview.addPINode('/Document Root/default_element/element3/element4') treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3', 'element4', 'New CDATA Section', 'New Comment', 'Instruction' ] ]) #doubleclick('JScrollPane$ScrollBar.') #doubleclick('JScrollPane$ScrollBar.') click('Tools') click('Options...') window('Global Options') click('JTree', '//jsxe/Tree View Options') select('Show comment nodes', 'false') click('OK') close() treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'element2', 'New CDATA Section', 'element3', 'element4', 'New CDATA Section', 'Instruction' ] ]) click('Tools') click('Options...') window('Global Options') click('JTree', '//jsxe/Tree View Options') select('Show comment nodes', 'true') click('OK') close() treeview.assertTree([ [ 'Document Root', 'default_element', 'element1', 'New Text Node', 'New Comment', 'element2', 'New CDATA Section', 'Comment Node', 'element3', 'element4', 'New CDATA Section', 'New Comment', 'Instruction' ] ]) close()