def test(): from Modules import commonBits java_recorded_version = '1.6.0_22' if window('Record Editor'): ## select_menu('Record Layouts>>Load Copybooks from Xml') select_menu('Record Layouts>>Load Copybooks from Xml') # select('File Name', r'C:\Users\BruceTst\RecordEditor_HSQL\CopyBook\Xml\asd') ## if commonBits.isWindowsLook(): select('File name', commonBits.paramDir() + r'Xml\asd') else: select('File Name', commonBits.paramDir() + r'Xml\asd') ## select('File name', commonBits.paramDir() + r'Xml\asd') ## select('File name', r'C:\Users\BruceTst\RecordEditor_HSQL\Xml\xx') click('Load From Directory') # assert_p('TextArea', 'Text', r'C:\Users\BruceTst\RecordEditor_HSQL\CopyBook\Xml\asd is not a directory !!!') assert_p('TextArea', 'Text', commonBits.paramDir() + r'Xml\asd is not a directory !!!') click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Record Layouts>>Load Copybooks from Cobol Directory') # select('File Name', r'C:\Users\BruceTst\RecordEditor_HSQL\CopyBook\Xml\sdf') ## select('File name', commonBits.paramDir() + r'Xml\sdf') if commonBits.isWindowsLook(): select('File name', commonBits.paramDir() + r'Xml\sdf') else: select('File Name', commonBits.paramDir() + r'Xml\sdf') click('Load') # assert_p('TextArea', 'Text', r'C:\Users\BruceTst\RecordEditor_HSQL\CopyBook\Xml\sdf is not a directory !!!') assert_p('TextArea', 'Text', commonBits.paramDir() + r'Xml\sdf is not a directory !!!') ## select('File Name', r'C:\Users\BruceTst\RecordEditor_HSQL\CopyBook\Xml\*') click('Load') click('BasicInternalFrameTitlePane$NoFocusButton2') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_22' if window('Record Editor'): select('File_Txt', commonBits.sampleDir() + 'Ams_PODownload_20041231.txt') click(commonBits.fl('Edit') + '1') click('Filter1') select('Fields.FieldRelationship_JTbl', '4', commonBits.fl('Value') + ',0') select( 'Fields.FieldRelationship_JTbl', 'cell:' + commonBits.fl('Operator') + ',0(' + commonBits.fl('Contains') + ')') ## click('ScrollPane$ScrollBar', 10, 33) select('Fields.FieldRelationship_JTbl', commonBits.fl('>= (Numeric)'), commonBits.fl('Operator') + ',0') select('TabbedPane', commonBits.fl('Group Filter')) select('Fields.FieldRelationship_JTbl1', '4', commonBits.fl('Value') + ',0') select( 'Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Operator') + ',0(' + commonBits.fl('Contains') + ')') ## click('ScrollPane$ScrollBar', 8, 92) select('Fields.FieldRelationship_JTbl1', commonBits.fl('>= (Numeric)'), commonBits.fl('Operator') + ',0') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Value') + ',1()') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Field') + ',0(0)') select('Filter.RecordSelection_JTbl1', 'cell:' + commonBits.fl('Include') + ',1(true)') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Value') + ',2()') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Field') + ',0(-2147483647)') click('ArrowButton') select_menu('ams PO Download: Allocation>>Pack Quantity 1') commonBits.save2(click) ## click(commonBits.fl('Save') + '1') ## select('File name', 'xx4') if commonBits.isWindowsLook(): select('File name', 'xx4') else: select('File Name', 'xx4') commonBits.save(click) ##click(commonBits.fl('Save')) select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Filter Options')) click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Table:')) ## click('MetalInternalFrameTitlePane', 644, 18) click('Filter1') click(commonBits.fl('Load')) if window('Open'): ##select('FilePane$3', 'xx4') ##select(commonBits.selectPane(), 'xx4') ##click('Open') if commonBits.isWindowsLook(): select('File name', 'xx4') else: select('File Name', 'xx4') click('Open') ## select('FileName', 'xx4') ## doubleclick('FilePane$3', '5') close() select('TabbedPane', commonBits.fl('Group Filter')) assert_p( 'Fields.FieldRelationship_JTbl1', 'Content', '[[, , 200004, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('>= (Numeric)') + ', 4], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ]]') commonBits.filter2(click) ## click(commonBits.fl('Filter') + '1') ## select('TabbedPane1', 'Table:') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Filter Options')) select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Table:')) assert_p( 'LineList.FileDisplay_JTbl1', 'Content', '[[D1, 4, 40000000, 1, 48320000, 4561, 50710000, 5, 45400000, 44, 207, 5354, , 4561, 5071, M, .ROSE 24, -6, 607 SHWL], [S1, 5009, 5, 5021, 5, 5025, 4, 5026, 4, 5047, 3, 5077, 2, 5127, 5, 5134, 4, 5142, 2], [S1, 5044, 2, 5071, 2, , 0, , 0, , 0, , 0, , 0, , 0, , 0]]' ) close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_03' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') commonBits.setRecordLayout(select, 'DTAR020') commonBits.doEdit(click) select_menu('View>>Sorted Field Tree') # select('List', 'DTAR020') # select('List', 'DTAR020') select('Table', 'cell:Field,0( )') # select('List', 'DTAR020') select('Table', 'DEPT-NO', 'Field,0') select('Table', 'DATE', 'Field,1') select('Table', 'cell:Field,1(DATE)') select('Table1', 'cell:Function,3()') select('Table', 'cell:Field,1(DATE)') select('Table1', 'Maximum', 'Function,3') select('Table1', 'Sum', 'Function,4') select('Table1', 'Sum', 'Function,5') select('Table1', 'cell:Function,5(Sum)') click('Build Tree') select('JTreeTable', 'cell:DEPT-NO,0(60)') assert_p('JTreeTable', 'Text', '60', 'DEPT-NO,0') select('JTreeTable', 'cell:SALE-PRICE,0(8.74)') assert_p('JTreeTable', 'Text', '8.74', 'SALE-PRICE,0') select('JTreeTable', 'cell:SALE-PRICE,1(166.94)') assert_p('JTreeTable', 'Text', '87.46', 'SALE-PRICE,2') select('JTreeTable', 'cell:SALE-PRICE,2(87.46)') assert_p('JTreeTable', 'Text', '87.46', 'SALE-PRICE,2') select('JTreeTable', 'cell:DEPT-NO,3(160)') assert_p('JTreeTable', 'Text', '160', 'DEPT-NO,3') select('JTreeTable', 'cell:QTY-SOLD,3(-1)') assert_p('JTreeTable', 'Text', '3', 'QTY-SOLD,4') select('JTreeTable', 'cell:QTY-SOLD,1(8)') assert_p('JTreeTable', 'Text', '-1', 'QTY-SOLD,3') select_menu('File>>Save Tree as XML') if window('Open'): ## select('FilePane$3', 'x1DTAR020.bin.xml') ## select('File Name', 'x1DTAR020.bin.xml') if commonBits.isWindowsLook(): select(commonBits.selectPane(), 'xx2DTAR020.bin.xml') else: select('File Name', 'xx2DTAR020.bin.xml') click('Open') close() click('Open') select('FileChooser', commonBits.sampleDir() + 'xx2DTAR020.bin.xml') commonBits.doEdit(click) ##------------------------------------------------- rightclick('JTreeTable', 'Tree,0') # select_menu('Fully Expand Tree') select_menu('Expand Tree') select('LayoutCombo', 'DEPT-NO') #-------------------------------------------------- select('JTreeTable', 'cell:DEPT-NO,1(998)') select('JTreeTable', 'cell:DEPT-NO,1(998)') select('JTreeTable', 'cell:SALE-PRICE,1(2996.75)') select('JTreeTable', 'cell:Xml~Prefix,1(null)') rightclick('JTreeTable', 'Xml~Prefix,1') select_menu('Expand Tree') select('JTreeTable', 'cell:SALE-PRICE,1(2996.75)') assert_p('JTreeTable', 'Text', '8.44', 'SALE-PRICE,6') select('JTreeTable', 'cell:SALE-PRICE,2(8.74)') assert_p('JTreeTable', 'Text', '1', 'QTY-SOLD,9') select('JTreeTable', 'cell:SALE-PRICE,3(166.94)') assert_p('JTreeTable', 'Text', '135.00', 'SALE-PRICE,12') select('JTreeTable', 'cell:SALE-PRICE,4(87.46)') assert_p('JTreeTable', 'Text', '-4.00', 'SALE-PRICE,11') select('JTreeTable', 'cell:Key,5(160)') assert_p('JTreeTable', 'Text', '220', 'Key,8') select('JTreeTable', 'cell:SALE-PRICE,7(150.26)') assert_p('JTreeTable', 'Text', '7', 'QTY-SOLD,13') select('JTreeTable', 'cell:Xml~Prefix,2(null)') rightclick('JTreeTable', 'Xml~Prefix,2') select_menu('Edit Record') select('JTreeTable', 'cell:Xml~Prefix,2(null)') select('Table', 'cell:Data,6(8.74)') assert_p('Table', 'Text', '8.74', 'Data,6') select('Table', 'cell:Data,4(60)') assert_p( 'Table', 'Content', '[[Xml~Name, 0, , DEPT-NO, DEPT-NO], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Key, 5, , 60, 60], [DEPT-NO, 6, , 60, 60], [QTY-SOLD, 7, , 1, 1], [SALE-PRICE, 8, , 8.74, 8.74], [Xml~End, 1, , , ], [Following~Text, 2, , , ]]' ) click('Right') select('Table', 'cell:Data,3(40118)') select('Table', 'cell:Data,3(40118)') assert_p('Table', 'Text', '1', 'Data,5') select('Table', 'cell:Data,6(8.74)') assert_p( 'Table', 'Content', '[[Xml~Name, 0, , DATE, DATE], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Key, 5, , 40118, 40118], [DEPT-NO, 6, , 60, 60], [QTY-SOLD, 7, , 1, 1], [SALE-PRICE, 8, , 8.74, 8.74], [Xml~End, 1, , , ], [Following~Text, 2, , , ]]' ) click('Right') select('Table', 'cell:Data,3(60614646)') select('Table', 'cell:Data,3(60614646)') assert_p('Table', 'Text', '60614646', 'Data,3') select('Table', 'cell:Data,5(40118)') assert_p( 'Table', 'Content', '[[Xml~Name, 0, , DTAR020, DTAR020], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [KEYCODE-NO, 5, , 60614646, 60614646], [STORE-NO, 6, , 166, 166], [DATE, 7, , 40118, 40118], [DEPT-NO, 8, , 60, 60], [QTY-SOLD, 9, , 1, 1], [SALE-PRICE, 10, , 6.00, 6.00], [Xml~End, 1, , True, True], [Following~Text, 2, , , ]]' ) click('Right') click('Right') select('Table', 'cell:Data,3(69644897)') select('Table', 'cell:Data,3(69644897)') assert_p('Table', 'Text', '166', 'Data,4') select('Table', 'cell:Data,5(40118)') assert_p( 'Table', 'Content', '[[Xml~Name, 0, , DTAR020, DTAR020], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [KEYCODE-NO, 5, , 69644897, 69644897], [STORE-NO, 6, , 166, 166], [DATE, 7, , 40118, 40118], [DEPT-NO, 8, , 60, 60], [QTY-SOLD, 9, , 1, 1], [SALE-PRICE, 10, , 5.08, 5.08], [Xml~End, 1, , True, True], [Following~Text, 2, , , ]]' ) select('Table', 'cell:Data,6(60)') select('Table', 'cell:Data,6(60)') assert_p('Table', 'Text', '1', 'Data,7') select('Table', 'cell:Data,6(60)') click('Right') select('Table', 'cell:Data,3(68654655)') select('Table', 'cell:Data,3(68654655)') assert_p( 'Table', 'Content', '[[Xml~Name, 0, , DTAR020, DTAR020], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [KEYCODE-NO, 5, , 68654655, 68654655], [STORE-NO, 6, , 166, 166], [DATE, 7, , 40118, 40118], [DEPT-NO, 8, , 60, 60], [QTY-SOLD, 9, , 1, 1], [SALE-PRICE, 10, , 5.08, 5.08], [Xml~End, 1, , True, True], [Following~Text, 2, , , ]]' ) close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_22' if window('Record Editor'): select('File_Txt', commonBits.sampleDir() + 'Ams_PODownload_20041231.txt') click(commonBits.fl('Edit') + '1') click('Filter1') select('Fields.FieldRelationship_JTbl', 'cell:' + commonBits.fl('Field') + ',0(null)') select('Filter.RecordSelection_JTbl', 'false', commonBits.fl('Include') + ',1') select('TabbedPane', commonBits.fl('Group Filter')) select('Filter.RecordSelection_JTbl1', 'false', commonBits.fl('In Group') + ',1') ## select('Filter.RecordSelection_JTbl1', 'cell:' + commonBits.fl('In Group') + ',1(false)') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Operator') + ',0(' + commonBits.fl('Contains') + ')') select('Fields.FieldRelationship_JTbl1', '>', commonBits.fl('Operator') + ',0') select('Fields.FieldRelationship_JTbl1', '4', commonBits.fl('Value') + ',0') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Value') + ',0()') select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Field') + ',0(-2147483647)') click('ArrowButton') ## select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Field') + ',0(0)') select_menu('ams PO Download: Allocation>>Pack Quantity 1') # select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Operator') + ',0(' + commonBits.fl('Contains') + ')') # select('Fields.FieldRelationship_JTbl1', '>', commonBits.fl('Operator') + ',0') # select('Fields.FieldRelationship_JTbl1', '4', commonBits.fl('Value') + ',0') # select('Fields.FieldRelationship_JTbl1', 'cell:' + commonBits.fl('Value') + ',0()') commonBits.save2(click) ## click(commonBits.fl('Save') + '1') ## select('File Name', 'xx5') if commonBits.isWindowsLook(): select('File name', 'xx5') else: select('File Name', 'xx5') commonBits.save(click) ## click(commonBits.fl('Save')) commonBits.filter2(click) # click(commonBits.fl('Filter') + '1') ## select('TabbedPane1', 'Table:') ## click('BasicInternalFrameTitlePane$NoFocusButton2') select('LineList.FileDisplay_JTbl1', 'cell:15 - 4|DC Number 2,0(1)') select('LineList.FileDisplay_JTbl1', 'cell:15 - 4|DC Number 2,0(1)') assert_p('LineList.FileDisplay_JTbl1', 'Content', '[[D1, 4, 40000000, 1, 48320000, 4561, 50710000, 5, 45400000, 44, 207, 5354, , 4561, 5071, M, .ROSE 24, -6, 607 SHWL], [S1, 5009, 5, 5021, 5, 5025, 4, 5026, 4, 5047, 3, 5077, 2, 5127, 5, 5134, 4, 5142, 2], [S1, 5044, 2, 5071, 2, , 0, , 0, , 0, , 0, , 0, , 0, , 0]]') select('LineList.FileDisplay_JTbl1', 'cell:15 - 4|DC Number 2,0(1)') click('DisplayFrame$TabButton', 25, 24) select('TabbedPane', 'Table:') select_menu(commonBits.fl('View') + '>>' + commonBits.fl('Execute Saved Filter')) select('File Name', 'xx5') click(commonBits.fl('Run Dialog')) select('TabbedPane', commonBits.fl('Group Filter')) select('Filter.RecordSelection_JTbl1', 'cell:' + commonBits.fl('Record') + ',1(ams PO Download: Header)') assert_p('Filter.RecordSelection_JTbl1', 'Content', '[[ams PO Download: Detail, true, true], [ams PO Download: Header, false, true], [ams PO Download: Allocation, true, true]]') select('Filter.RecordSelection_JTbl1', 'cell:' + commonBits.fl('Record') + ',1(ams PO Download: Header)') assert_p('Fields.FieldRelationship_JTbl1', 'Content', '[[, , 200004, true, ' + commonBits.fl('First') + ', >, 4], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ]]') select('Filter.RecordSelection_JTbl1', 'cell:' + commonBits.fl('Record') + ',1(ams PO Download: Header)') commonBits.filter2(click) # click(commonBits.fl('Filter') + '1') ## select('TabbedPane1', 'Table:') select_menu(commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Table:')) select('LineList.FileDisplay_JTbl2', 'cell:15 - 4|DC Number 2,1(5021)') assert_p('LineList.FileDisplay_JTbl2', 'Content', '[[D1, 4, 40000000, 1, 48320000, 4561, 50710000, 5, 45400000, 44, 207, 5354, , 4561, 5071, M, .ROSE 24, -6, 607 SHWL], [S1, 5009, 5, 5021, 5, 5025, 4, 5026, 4, 5047, 3, 5077, 2, 5127, 5, 5134, 4, 5142, 2], [S1, 5044, 2, 5071, 2, , 0, , 0, , 0, , 0, , 0, , 0, , 0]]') select('LineList.FileDisplay_JTbl2', 'cell:15 - 4|DC Number 2,1(5021)') select_menu(commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Filter Options')) ## select('LineList.FileDisplay_JTbl2', 'cell:15 - 4|DC Number 2,1(5021)') click('BasicInternalFrameTitlePane$NoFocusButton2') select('LineList.FileDisplay_JTbl2', 'cell:15 - 4|DC Number 2,1(5021)') select('LineList.FileDisplay_JTbl2', 'cell:15 - 4|DC Number 2,1(5021)') select_menu(commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Table:')) select('LineList.FileDisplay_JTbl2', 'cell:15 - 4|DC Number 2,1(5021)') click(commonBits.fl('Table:')) select('TabbedPane', 'Table:') click('Find1') click('BasicInternalFrameTitlePane$NoFocusButton2') click('Filter1') click(commonBits.fl('Load')) if window('Open'): ##select('FilePane$3', 'xx5') if commonBits.isWindowsLook(): select('File name', 'xx5') else: select('File Name', 'xx5') ## select('File Name', 'xx5') click('Open') close() ## select('TabbedPane', commonBits.fl('Group Filter')) assert_p('Filter.RecordSelection_JTbl1', 'Content', '[[ams PO Download: Detail, true, true], [ams PO Download: Header, false, true], [ams PO Download: Allocation, true, true]]') assert_p('Fields.FieldRelationship_JTbl1', 'Content', '[[, , 200004, true, ' + commonBits.fl('First') + ', >, 4], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', 0, true, ' + commonBits.fl('First') + ', ' + commonBits.fl('Contains') + ', ]]') commonBits.filter2(click) # click(commonBits.fl('Filter') + '1') ## select('TabbedPane1', 'Table:') ## click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu(commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Table:')) click(commonBits.fl('Table:') + '2') select('TabbedPane', 'Table:') click(commonBits.fl('Table:') + '3') select('TabbedPane', 'Table:') assert_p('LineList.FileDisplay_JTbl3', 'Content', '[[D1, 4, 40000000, 1, 48320000, 4561, 50710000, 5, 45400000, 44, 207, 5354, , 4561, 5071, M, .ROSE 24, -6, 607 SHWL], [S1, 5009, 5, 5021, 5, 5025, 4, 5026, 4, 5047, 3, 5077, 2, 5127, 5, 5134, 4, 5142, 2], [S1, 5044, 2, 5071, 2, , 0, , 0, , 0, , 0, , 0, , 0, , 0]]')
def test(): from Modules import commonBits java_recorded_version = "1.6.0_03" if window("Protocol Buffer Editor"): select_menu("Utilities>>Compare Menu") click("*1") click("Choose File") if window("Open"): select(commonBits.selectPaneFn(), "Ams_LocDownload_20041228_Extract.bin") click("Open") close() click("Choose File1") if window("Open"): select(commonBits.selectPaneFn(), "Ams_LocDownload_20041228_Extract2.bin") click("Open") close() # commonBits.setRecordLayout2(select, 'ams Store') click("Right") select("TabbedPane", "") click("Right") select("TabbedPane", "") click("Choose File") if window("Save"): ## select(commonBits.selectPane(), 'Compare') ## doubleclick(commonBits.selectPane(), '0') if commonBits.isWindowsLook(): select(commonBits.selectPane(), "zzTest_asmLocation.Xml") else: select("File Name", "zzTest_asmLocation.Xml") click("Save") close() click("Save1") assert_p("TextField", "Text", "") assert_p("TextArea", "Text", "") click("Compare") select("Table", "cell:Loc_Name,3(VIC West Ad Support)") assert_p("Table", "Text", "VIC West Ad Support", "Loc_Name,3") select("Table", "cell:Loc_Name,6(Miranda)") assert_p("Table", "Text", "Miranda", "Loc_Name,6") select("Table", "cell:Loc_Name,7(Ringwood)") assert_p( "Table", "Content", "[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B, Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary's, Charles Hackett Drive, St Mary's, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive & Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]", ) select("Table", "cell:Loc_Name,7(Ringwood)") click("BasicInternalFrameTitlePane$NoFocusButton2") click("BasicInternalFrameTitlePane$NoFocusButton2") click("*") select("FileChooser", commonBits.userDir() + "Compare" + commonBits.fileSep() + "zzTest_asmLocation.Xml") click("Run Compare") select("Table", "cell:Loc_Name,11(Highpoint City)") assert_p("Table", "Text", "Laverton", "Loc_Addr_Ln1,11") select("Table", "cell:Loc_Name,14(Bass Hill)") assert_p("Table", "Text", "Bass Hill", "Loc_Name,14") select("Table", "cell:Loc_Name,16(Campbelltown)") assert_p( "Table", "Content", "[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B, Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary's, Charles Hackett Drive, St Mary's, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive & Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]", ) close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_03' if window(commonBits.applicationName()): select_menu('Utilities>>Compare Menu') click('*1') click('FileSearch') if window('Open'): select(commonBits.selectPaneFn(), 'Ams_LocDownload_20041228_Extract.bin') click('Open') close() click('FileSearch1') if window('Open'): select(commonBits.selectPaneFn(), 'Ams_LocDownload_20041228_Extract2.bin') click('Open') close() #commonBits.setRecordLayout2(select, 'ams Store') click('Right') select('TabbedPane', '') click('Right') select('TabbedPane', '') click('FileSearch') if window('Save'): ## select(commonBits.selectPane(), 'Compare') ## doubleclick(commonBits.selectPane(), '0') if commonBits.isWindowsLook(): select(commonBits.selectPane(), 'zzTest_asmLocation.Xml') else: select('File Name', 'zzTest_asmLocation.Xml') click('Save') close() click('Save1') assert_p('TextField', 'Text', '') assert_p('TextArea', 'Text', '') click('Compare') select('Table', 'cell:Loc_Name,3(VIC West Ad Support)') assert_p('Table', 'Text', 'VIC West Ad Support', 'Loc_Name,3') select('Table', 'cell:Loc_Name,6(Miranda)') assert_p('Table', 'Text', 'Miranda', 'Loc_Name,6') select('Table', 'cell:Loc_Name,7(Ringwood)') assert_p( 'Table', 'Content', '[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B, Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive & Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]' ) select('Table', 'cell:Loc_Name,7(Ringwood)') click('BasicInternalFrameTitlePane$NoFocusButton2') click('BasicInternalFrameTitlePane$NoFocusButton2') click('*') select( 'FileNameTxtFld', commonBits.userDir() + 'Compare' + commonBits.fileSep() + 'zzTest_asmLocation.Xml') click('Run Compare') select('Table', 'cell:Loc_Name,11(Highpoint City)') assert_p('Table', 'Text', 'Laverton', 'Loc_Addr_Ln1,11') select('Table', 'cell:Loc_Name,14(Bass Hill)') assert_p('Table', 'Text', 'Bass Hill', 'Loc_Name,14') select('Table', 'cell:Loc_Name,16(Campbelltown)') assert_p( 'Table', 'Content', '[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B, Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive & Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]' ) close()