def test(): from Modules import commonBits java_recorded_version = '1.6.0_03' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'zzAms_LocDownload_tab.csv') commonBits.setRecordLayout(select, 'Generic CSV - enter details') commonBits.doEdit(click) if window(''): select('CheckBox', 'true') select('Table', 'rows:[0,1],columns:[Brand_Id,Loc_Nbr,Loc_Type,Loc_Name]') ## rightclick('Table', 'Loc_Name,1') select('Table', 'cell:Loc_Name,3(WA Ad Support)') assert_p('Table', 'Text', 'WA Ad Support', 'Loc_Name,3') select('Table', 'cell:Loc_Name,6(Blacktown)') assert_p('Table', 'Text', 'Blacktown', 'Loc_Name,6') select('Table', 'cell:Loc_Name,6(Blacktown)') commonBits.doSleep() click(commonBits.fl('Go')) commonBits.doSleep() commonBits.doSleep() close() commonBits.doSleep() commonBits.doSleep() select('Table', 'cell:5|Loc_Addr_Ln1,8(Westfield Shoppingtown)') assert_p('Table', 'Text', 'Campbelltown Mall', '5|Loc_Addr_Ln1,13') select('Table', 'cell:5|Loc_Addr_Ln1,13(Campbelltown Mall)') assert_p('Table', 'Text', 'Campbelltown Mall', '5|Loc_Addr_Ln1,13') select('Table', 'rows:[5,6,7],columns:[4|Loc_Name]') select_menu(commonBits.fl('View') + '>>' + commonBits.fl('Column View #{Selected Records#}')) ## select('Table2', 'rows:[5,6,7],columns:[4|Loc_Name]') select('Table', 'cell:Row 1,5(58 Leland Street)') assert_p('Table', 'Text', '58 Leland Street', 'Row 1,5') select('Table', 'cell:Row 2,6( 11 Melissa Place)') assert_p('Table', 'Text', 'Marayong', 'Row 2,7') select('Table', 'cell:Row 2,6( 11 Melissa Place)') assert_p('Table', 'Content', '[[TAR, TAR, TAR], [5019, 5033, 5035], [ST, ST, ST], [Penrith, Blacktown, Rockdale], [Penrith, Marayong, Building B], [58 Leland Street, Dock 2, Portside DC], [Penrith, 11 Melissa Place, 2-8 Mc Pherson Street], [2750, Marayong, Botany], [NSW, 2148, 2019], [A, NSW, NSW], [, A, A]]') select('Table', 'cell:Row 2,6( 11 Melissa Place)') assert_p('Table', 'ColumnCount', '3') select('Table', 'cell:Row 3,6(2-8 Mc Pherson Street)') assert_p('Table', 'RowCount', '11') select('Table', 'cell:Row 3,2(ST)') select('Table1', 'cell:' + commonBits.fl('Field') + ',2(Loc_Type)') assert_p('Table1', 'Content', '[[Brand_Id, 1, ], [Loc_Nbr, 2, ], [Loc_Type, 3, ], [Loc_Name, 4, ], [Loc_Addr_Ln1, 5, ], [Loc_Addr_Ln2, 6, ], [Loc_Addr_Ln3, 7, ], [Loc_Postcode, 8, ], [Loc_State, 9, ], [Loc_Actv_Ind, 10, ], [K, 11, ]]') select('Table1', 'cell:' + commonBits.fl('Field') + ',2(Loc_Type)') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select('Table', 'rows:[5,6,7],columns:[4|Loc_Name]') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'Text_utf8_Test.txt') select('ComboBox2', 'Unknown Format') commonBits.doEdit(click) if window(''): select('TextField1', 'utf-8') ## select('BmKeyedComboBox', '90') select('BmKeyedComboBox', 'Text IO (Unicode)') select('Table', 'cell:J,1(P)') assert_p('Table', 'Content', '[[T, A, R, 5, 0, 1, 5, S, T, B, a, n, k, s, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , B, a, n, k, s, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , U, n, i, t, , 2, ,, , 3, 9, -, 4, 1, , A, l, l, i, n, g, h, a, m, , S, t, r, e, e, t, , , , , , , , , , , C, o, n, d, e, l, l, , P, a, r, k, , , , , , , , , , , , , , , , , , , , , , , , 2, 2, 0, 0, , , , , , , N, S, W, A], [T, A, R, 5, 0, 1, 9, S, T, P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 5, 8, , L, e, l, a, n, d, , S, t, r, e, e, t, , , , , , , , , , , , , , , , , , , , , , , , , P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 7, 5, 0, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 3, S, T, B, l, a, c, k, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , D, o, c, k, , 2, ,, , 1, 1, , M, e, l, i, s, s, a, , P, l, a, c, e, , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 1, 4, 8, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 5, S, T, R, o, c, k, d, a, l, e, , , , , , , , , , , , , , , , , , , , , , , , , , , , B, u, i, l, d, i, n, g, , B, ,, , , P, o, r, t, s, i, d, e, , D, C, , , , , , , , , , , , , , , , , 2, -, 8, , M, c, , P, h, e, r, s, o, n, , S, t, r, e, e, t, , , , , , , , , , , , , , , , , , , , B, o, t, a, n, y, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 0, 1, 9, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 7, S, T, M, i, r, a, n, d, a, , , , , , , , , , , , , , , , , , , , , , , , , , , , , W, e, s, t, f, i, e, l, d, , S, h, o, p, p, i, n, g, t, o, w, n, , , , , , , , , , , , , , , , , , , C, n, r, ., , U, r, u, n, g, a, , P, d, e, , &, , T, h, e, , K, i, n, g, s, w, a, y, , , , , , , , , , , M, i, r, a, n, d, a, , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 2, 2, 8, , , , , , , N, S, W, A], [T, A, R, 5, 0, 5, 2, S, T, E, a, s, t, w, o, o, d, , , , , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , O, f, f, s, i, t, e, , R, e, s, e, r, v, e, , , , , , , , , , , , , , , , , 1, 1, , M, e, l, i, s, s, a, , P, l, a, c, e, , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 1, 4, 8, , , , , , , N, S, W, A]]') select('Table', 'cell:J,1(P)') ## assert_p('BmKeyedComboBox', 'Text', '90') ## assert_p('BmKeyedComboBox', 'Text', '90') assert_p('BmKeyedComboBox', 'Text', 'Text IO (Unicode)') commonBits.doSleep() click('Go') #commonBits.doSleep() close() commonBits.doSleep() commonBits.doSleep() select_menu('Window>>Text_utf8_Test.txt>>Table:') select('Table', 'cell:1 - 1|Data,1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)') assert_p('Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]') select('Table', 'cell:1 - 1|Data,1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)') select('LayoutCombo', 'Full Line') select('Table', 'cell:Full Line,2(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') assert_p('Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]') select('Table', 'cell:Full Line,2(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') select('LayoutCombo', 'UnknownFormatRecord') select('Table', 'cell:1 - 1|Data,3(TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA)') assert_p('Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_10' if window('Record Editor'): commonBits.selectOldFilemenu(select_menu, 'Utilities', 'File Copy Menu') click('*5') select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') select('FileChooser1', commonBits.sampleDir() + 'csvDTAR020comma.csv') commonBits.setRecordLayout2(select, 'DTAR020') if commonBits.isJRecord(): select('FileChooser3', commonBits.velocityDir() + 'toCsv_Comma.vm') else: select('FileChooser2', commonBits.velocityDir() + 'toCsv_Comma.vm') click('Right') select('TabbedPane', '') ##click('Copy2') commonBits.copy(click) rightclick('TextField') assert_p('TextField1', 'Text', commonBits.fl('Copy Done !!!')) commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') click('Open') click('Open') select('FileChooser', commonBits.sampleDir() + 'csvDTAR020comma.csv') commonBits.doEdit(click) if window(''): select('CheckBox', 'true') click(commonBits.fl('Go')) commonBits.doSleep() close() commonBits.doSleep() # select('Table', 'rows:[1,2,3,4,5,6,7,8,9,10,11],columns:[1|KEYCODE-NO,2|STORE-NO]') select( 'Table', 'rows:[1,2,3,4,5,6,7,8,9,10,11],columns:[1|KEYCODE-NO,2|STORE-NO]') select_menu( commonBits.fl('View') + '>>' + commonBits.fl('Table View #{Selected Records#}')) ## select('Table2', 'rows:[1,2,3,4,5,6,7,8,9,10,11],columns:[1|KEYCODE-NO,2|STORE-NO]') select('Table', 'cell:1|KEYCODE-NO,3(69694158)') ## assert_p('Table', 'Content', '[[69684558, 20, 40118, 280, -1, -19.00], [69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70]]') assert_p( 'Table', 'Content', '[[69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70]]' ) select('Table', 'cell:1|KEYCODE-NO,3(69694158)') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') ## select('Table', 'rows:[1,2,3,4,5,6,7,8,9,10,11],columns:[1|KEYCODE-NO,2|STORE-NO]') ## select('Table', 'rows:[1,2,3,4,5,6,7,8,9,10,11],columns:[1|KEYCODE-NO,2|STORE-NO]') select_menu( commonBits.fl('Window') + '>>csvDTAR020comma.csv>>' + commonBits.fl('Table:')) select( 'Table', 'rows:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],columns:[1|KEYCODE-NO]' ) select_menu( commonBits.fl('View') + '>>' + commonBits.fl('Table View #{Selected Records#}')) ## select('Table2', 'rows:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],columns:[1|KEYCODE-NO]') select('Table', 'cell:2|STORE-NO,5(59)') assert_p( 'Table', 'Content', '[[60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [62684217, 59, 40118, 957, 1, 9.99], [67674686, 59, 40118, 929, 1, 3.99], [61684613, 59, 40118, 335, 1, 12.99], [64624770, 59, 40118, 957, 1, 2.59], [69694814, 166, 40118, 360, 1, 2.50], [69694814, 166, 40118, 360, 1, 2.50], [69644164, 166, 40118, 193, 1, 21.59], [62684907, 166, 40118, 375, 1, 13.99], [62694193, 166, 40118, 375, 1, 13.99], [62694193, 166, 40118, 375, -1, -13.99], [62694193, 166, 40118, 375, 1, 11.99], [63654450, 166, 40118, 320, 1, 13.99], [62664576, 166, 40118, 320, 1, 9.72]]' ) select('Table', 'cell:2|STORE-NO,5(59)') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') ## select('Table', 'rows:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],columns:[1|KEYCODE-NO]') ## select('Table', 'rows:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],columns:[1|KEYCODE-NO]') select_menu( commonBits.fl('Window') + '>>csvDTAR020comma.csv>>' + commonBits.fl('Table:')) select('Table', 'cell:2|STORE-NO,38(166)') rightclick('Table', '2|STORE-NO,38') select_menu(commonBits.fl('Edit Record')) ## select('Table1', 'cell:2|STORE-NO,38(166)') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 64674965, 64674965], [STORE-NO, 2, , 166, 166], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 235, 235], [QTY-SOLD, 5, , -1, -1], [SALE-PRICE, 6, , -19.99, -19.99]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') assert_p('TextArea', 'Text', '64674965,166,40118,235,-1,-19.99,') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 64674965, 64674965], [STORE-NO, 2, , 166, 166], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 235, 235], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 12.00, 12.00]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') assert_p('TextArea', 'Text', '64674965,166,40118,235,1,12.00,') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 60624523, 60624523], [STORE-NO, 2, , 166, 166], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 261, 261], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 12.00, 12.00]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') assert_p('TextArea', 'Text', '60624523,166,40118,261,1,12.00,') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 66624253, 66624253], [STORE-NO, 2, , 166, 166], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 957, 957], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 3.49, 3.49]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') click('TextArea') assert_p('TextArea', 'Text', '66624253,166,40118,957,1,3.49,') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 66624253, 66624253], [STORE-NO, 2, , 166, 166], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 957, 957], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 3.49, 3.49]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') assert_p('TextArea', 'Text', '66624253,166,40118,957,1,3.49,') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 64654284, 64654284], [STORE-NO, 2, , 166, 166], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 957, 957], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 3.99, 3.99]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') assert_p('TextArea', 'Text', '64654284,166,40118,957,1,3.99,') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select('Table', 'cell:2|STORE-NO,38(166)') select('Table', 'cell:2|STORE-NO,38(166)') select_menu( commonBits.fl('Window') + '>>csvDTAR020comma.csv>>' + commonBits.fl('Table:')) select('Table', 'cell:2|STORE-NO,38(166)') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') commonBits.selectOldFilemenu(select_menu, 'Utilities', 'Compare Menu') click('*2') select('FileChooser', commonBits.sampleDir() + 'csvDTAR020comma.csv') click('Right') if window(''): select('CheckBox', 'true') click(commonBits.fl('Go')) close() select('TabbedPane', '') select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') click('Right') select('TabbedPane', '') select('Table', 'cell:' + commonBits.fl('Equivalent Record') + ',0(-1)') select('Table', 'DTAR020', commonBits.fl('Equivalent Record') + ',0') select('Table', 'cell:' + commonBits.fl('Equivalent Record') + ',0(0)') select('Table1', 'cell:' + commonBits.fl('Field') + ',2(DATE)') assert_p( 'Table1', 'Content', '[[KEYCODE-NO, KEYCODE-NO], [STORE-NO, STORE-NO], [DATE, DATE], [DEPT-NO, DEPT-NO], [QTY-SOLD, QTY-SOLD], [SALE-PRICE, SALE-PRICE]]' ) ## select('Table1', '') select('Table', 'cell:' + commonBits.fl('Record') + ',0(GeneratedCsvRecord)') assert_p('Table', 'Content', '[[GeneratedCsvRecord, DTAR020]]') select('Table', 'cell:' + commonBits.fl('Record') + ',0(GeneratedCsvRecord)') click('Right') select('TabbedPane', '') click(commonBits.fl('Compare')) assert_p('TextPane', 'Text', 'Files are Identical !!!') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'MF_VB_Test.bin') select('ComboBox2', 'Unknown Format') commonBits.doEdit(click) if window(''): select('Table', 'cell:J,1(P)') assert_p( 'Table', 'Content', '[[T, A, R, 5, 0, 1, 5, S, T, B, a, n, k, s, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , B, a, n, k, s, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , U, n, i, t, , 2, ,, , 3, 9, -, 4, 1, , A, l, l, i, n, g, h, a, m, , S, t, r, e, e, t, , , , , , , , , , , C, o, n, d, e, l, l, , P, a, r, k, , , , , , , , , , , , , , , , , , , , , , , , 2, 2, 0, 0, , , , , , , N, S, W, A], [T, A, R, 5, 0, 1, 9, S, T, P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 5, 8, , L, e, l, a, n, d, , S, t, r, e, e, t, , , , , , , , , , , , , , , , , , , , , , , , , P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 7, 5, 0, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 3, S, T, B, l, a, c, k, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , D, o, c, k, , 2, ,, , 1, 1, , M, e, l, i, s, s, a, , P, l, a, c, e, , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 1, 4, 8, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 5, S, T, R, o, c, k, d, a, l, e, , , , , , , , , , , , , , , , , , , , , , , , , , , , B, u, i, l, d, i, n, g, , B, ,, , , P, o, r, t, s, i, d, e, , D, C, , , , , , , , , , , , , , , , , 2, -, 8, , M, c, , P, h, e, r, s, o, n, , S, t, r, e, e, t, , , , , , , , , , , , , , , , , , , , B, o, t, a, n, y, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 0, 1, 9, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 7, S, T, M, i, r, a, n, d, a, , , , , , , , , , , , , , , , , , , , , , , , , , , , , W, e, s, t, f, i, e, l, d, , S, h, o, p, p, i, n, g, t, o, w, n, , , , , , , , , , , , , , , , , , , C, n, r, ., , U, r, u, n, g, a, , P, d, e, , &, , T, h, e, , K, i, n, g, s, w, a, y, , , , , , , , , , , M, i, r, a, n, d, a, , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 2, 2, 8, , , , , , , N, S, W, A], [T, A, R, 5, 0, 5, 2, S, T, E, a, s, t, w, o, o, d, , , , , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , O, f, f, s, i, t, e, , R, e, s, e, r, v, e, , , , , , , , , , , , , , , , , 1, 1, , M, e, l, i, s, s, a, , P, l, a, c, e, , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 1, 4, 8, , , , , , , N, S, W, A]]' ) select('Table', 'cell:J,1(P)') # assert_p('BmKeyedComboBox', 'Text', '4') assert_p('BmKeyedComboBox', 'Text', commonBits.fl('Mainframe VB (rdw based) Binary')) commonBits.doSleep() click(commonBits.fl('Go')) commonBits.doSleep() close() commonBits.doSleep() select_menu( commonBits.fl('Window') + '>>MF_VB_Test.bin>>' + commonBits.fl('Table:')) select( 'Table', 'cell:1 - 1|Data,1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)' ) assert_p( 'Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]' ) select( 'Table', 'cell:1 - 1|Data,1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)' ) select('LayoutCombo', commonBits.fl('Full Line')) select( 'Table', 'cell:' + commonBits.fl('Full Line') + ',1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)' ) assert_p( 'Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]' ) select( 'Table', 'cell:' + commonBits.fl('Full Line') + ',1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)' ) select('LayoutCombo', commonBits.fl('Hex 1 Line')) assert_p( 'Table', 'Text', 'e3c1d9f5f0f1f5e2e3c2819592a2a396a6954040404040404040404040404040404040404040404040404040c2819592a2a396a69540404040404040404040404040404040404040404040404040404040404040e49589a340f26b40f3f960f4f140c1939389958788819440e2a3998585a340404040404040404040c396958485939340d78199924040404040404040404040404040404040404040404040f2f2f0f0404040404040d5e2e6c1', ' + 1|' + commonBits.fl('Hex (1 Line)') + ',0') assert_p( 'Table', 'Text', 'e3c1d9f5f0f1f9e2e3d785959989a38840404040404040404040404040404040404040404040404040404040d785959989a388404040404040404040404040404040404040404040404040404040404040404040f5f840d3859381958440e2a3998585a3404040404040404040404040404040404040404040404040d785959989a38840404040404040404040404040404040404040404040404040404040f2f7f5f0404040404040d5e2e6c1', ' + 1|' + commonBits.fl('Hex (1 Line)') + ',1') assert_p( 'Table', 'Text', 'e3c1d9f5f0f3f3e2e3c293818392a396a6954040404040404040404040404040404040404040404040404040d4819981a89695874040404040404040404040404040404040404040404040404040404040404040c496839240f26b40f1f140d4859389a2a28140d79381838540404040404040404040404040404040d4819981a8969587404040404040404040404040404040404040404040404040404040f2f1f4f8404040404040d5e2e6c1', ' + 1|' + commonBits.fl('Hex (1 Line)') + ',2') assert_p( 'Table', 'Text', 'e3c1d9f5f0f3f5e2e3d996839284819385404040404040404040404040404040404040404040404040404040c2a489938489958740c26b4040d79699a3a289848540c4c340404040404040404040404040404040f260f840d48340d7888599a2969540e2a3998585a340404040404040404040404040404040404040c296a38195a84040404040404040404040404040404040404040404040404040404040f2f0f1f9404040404040d5e2e6c1', ' + 1|' + commonBits.fl('Hex (1 Line)') + ',3') assert_p( 'Table', 'Text', 'e3c1d9f5f0f3f7e2e3d489998195848140404040404040404040404040404040404040404040404040404040e685a2a3868985938440e288969797899587a396a695404040404040404040404040404040404040c395994b40e499a495878140d78485405040e3888540d2899587a2a681a840404040404040404040d489998195848140404040404040404040404040404040404040404040404040404040f2f2f2f8404040404040d5e2e6c1', ' + 1|' + commonBits.fl('Hex (1 Line)') + ',4') assert_p( 'Table', 'Text', 'e3c1d9f5f0f5f2e2e3c581a2a3a6969684404040404040404040404040404040404040404040404040404040d4819981a896958740d68686a289a38540d985a28599a58540404040404040404040404040404040f1f140d4859389a2a28140d793818385404040404040404040404040404040404040404040404040d4819981a8969587404040404040404040404040404040404040404040404040404040f2f1f4f8404040404040d5e2e6c1', ' + 1|' + commonBits.fl('Hex (1 Line)') + ',5') select('LayoutCombo', commonBits.fl('Hex 2 Lines (Mainframe Style)')) assert_p( 'Table', 'Text', '''T A R 5 0 1 5 S T B a n k s t o w n B a n k s t o w n U n i t 2 , 3 9 - 4 1 A l l i n g h a m S t r e e t C o n d e l l P a r k 2 2 0 0 N S W A e3c1d9f5f0f1f5e2e3c2819592a2a396a6954040404040404040404040404040404040404040404040404040c2819592a2a396a69540404040404040404040404040404040404040404040404040404040404040e49589a340f26b40f3f960f4f140c1939389958788819440e2a3998585a340404040404040404040c396958485939340d78199924040404040404040404040404040404040404040404040f2f2f0f0404040404040d5e2e6c1''', ' + 1|' + commonBits.fl('Hex (2 Lines)') + ',0') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') assert_p( 'Table', 'Text', '''T A R 5 0 1 9 S T P e n r i t h P e n r i t h 5 8 L e l a n d S t r e e t P e n r i t h 2 7 5 0 N S W A e3c1d9f5f0f1f9e2e3d785959989a38840404040404040404040404040404040404040404040404040404040d785959989a388404040404040404040404040404040404040404040404040404040404040404040f5f840d3859381958440e2a3998585a3404040404040404040404040404040404040404040404040d785959989a38840404040404040404040404040404040404040404040404040404040f2f7f5f0404040404040d5e2e6c1''', ' + 1|' + commonBits.fl('Hex (2 Lines)') + ',1') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') assert_p( 'Table', 'Text', '''T A R 5 0 3 3 S T B l a c k t o w n M a r a y o n g D o c k 2 , 1 1 M e l i s s a P l a c e M a r a y o n g 2 1 4 8 N S W A e3c1d9f5f0f3f3e2e3c293818392a396a6954040404040404040404040404040404040404040404040404040d4819981a89695874040404040404040404040404040404040404040404040404040404040404040c496839240f26b40f1f140d4859389a2a28140d79381838540404040404040404040404040404040d4819981a8969587404040404040404040404040404040404040404040404040404040f2f1f4f8404040404040d5e2e6c1''', ' + 1|' + commonBits.fl('Hex (2 Lines)') + ',2') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') assert_p( 'Table', 'Text', '''T A R 5 0 3 5 S T R o c k d a l e B u i l d i n g B , P o r t s i d e D C 2 - 8 M c P h e r s o n S t r e e t B o t a n y 2 0 1 9 N S W A e3c1d9f5f0f3f5e2e3d996839284819385404040404040404040404040404040404040404040404040404040c2a489938489958740c26b4040d79699a3a289848540c4c340404040404040404040404040404040f260f840d48340d7888599a2969540e2a3998585a340404040404040404040404040404040404040c296a38195a84040404040404040404040404040404040404040404040404040404040f2f0f1f9404040404040d5e2e6c1''', ' + 1|' + commonBits.fl('Hex (2 Lines)') + ',3') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') ## assert_p('Table', 'Text', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') ## assert_p('Table', 'Text', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') rightclick( 'Table', ' + 1|' + commonBits.fl('Hex (2 Lines)') + ',1') select_menu(commonBits.fl('Edit Record')) ## select('Table1', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') assert_p( 'Table', 'Content', '[[Data, 1, 1, TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA, T, e3c1d9f5f0f1f9e2e3d785959989a38840404040404040404040404040404040404040404040404040404040d785959989a388404040404040404040404040404040404040404040404040404040404040404040f5f840d3859381958440e2a3998585a3404040404040404040404040404040404040404040404040d785959989a38840404040404040404040404040404040404040404040404040404040f2f7f5f0404040404040d5e2e6c1]]' ) select('CheckBox', 'false') select('Table', 'cell:' + commonBits.fl('Hex') + ',0([B@db7e08)') assert_p( 'Table', 'Text', '''TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSW ecdffffeed8998a84444444444444444444444444444d8998a8444444444444444444444444444444444ff4d898984ea988a444444444444444444444444d8998a84444444444444444444444444444ffff444444dee 3195019237559938000000000000000000000000000075599380000000000000000000000000000000005803531540239553000000000000000000000000755993800000000000000000000000000002750000000526''', commonBits.fl('Hex') + ',0') ## assert_p('Table', 'Content', '[[Data, 1, 1, TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA, T, [B@fc519b]]') ## assert_p('Table', 'Content', '[[Data, 1, 1, TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA, T, [B@fc519b]]') select('Table', 'cell:' + commonBits.fl('Hex') + ',0([B@106ef07)') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select( 'Table', 'cell: + 1|' + commonBits.fl('Hex (2 Lines)') + ',1([B@150b06b)') close()
def test(): from Modules import commonBits java_recorded_version = '1.5.0_11' if window('Record Editor'): select_menu('Record Layouts>>Edit Layout') select('Table', 'cell:Record Name,0(ams PO Download)') select('TextField', 'ams PO D%') select('TextField1', '%') #select('TabbedPane', 'Extras') #select('TabbedPane', 'Child Records') select('Table', 'cell:Record Name,0(ams PO Download)') select('ChildRecordsJTbl', 'cell:Child Name,1(0)') assert_p('ChildRecordsJTbl', 'Text', '', 'Child Name,1') select('ChildRecordsJTbl', 'cell:Child Name,2(0)') if commonBits.isVersion82(): ## assert_p('ChildRecordsJTbl', 'Content', '[[, ams PO Download: Detail, 0, Record Type, D1, , ], [, ams PO Download: Header, 0, Record Type, H1, , ], [, ams PO Download: Allocation, 0, Record Type, S1, , ]]') assert_p('ChildRecordsJTbl', 'Content', '[[, ams PO Download: Detail, , Record Type, D1, , ], [, ams PO Download: Header, , Record Type, H1, , ], [, ams PO Download: Allocation, , Record Type, S1, , ]]') assert_p('ChildRecordsJTbl', 'Content', '[[, ams PO Download: Detail, , Record Type, D1, , ], [, ams PO Download: Header, , Record Type, H1, , ], [, ams PO Download: Allocation, , Record Type, S1, , ]]') elif commonBits.isVersion80(): assert_p('ChildRecordsJTbl', 'Content', '[[, 353, 0, Record Type, D1, , -1], [, 356, 0, Record Type, H1, , -1], [, 357, 0, Record Type, S1, , -1]]') assert_p('ChildRecordsJTbl', 'Content', '[[, 353, 0, Record Type, D1, , -1], [, 356, 0, Record Type, H1, , -1], [, 357, 0, Record Type, S1, , -1]]') else: assert_p('ChildRecordsJTbl', 'Content', '[[, 353, 0, Record Type, D1, -1], [, 356, 0, Record Type, H1, -1], [, 357, 0, Record Type, S1, -1]]') select('ChildRecordsJTbl', 'cell:Child Name,0(0)') assert_p('ChildRecordsJTbl', 'Text', 'cell:Child Name,0()') select('TextField', 'ams PO Download: Detail%') select('TextField1', '%') #select('TabbedPane', 'Extras') #select('TabbedPane', 'Fields') #select('Table', '') select('RecordFieldsJTbl', 'cell:Description,2()') assert_p('RecordFieldsJTbl', 'Text', '', 'Description,2') select('RecordFieldsJTbl', 'cell:Description,3()') if commonBits.version() == 'MsAccess': assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, Record Type, , 0, 0, 15, Ams PO Download, , ], [3, 9, Pack Qty, , 8, 4, 0, , , ], [12, 13, Pack Cost, , 8, 4, 0, , , ], [25, 13, APN, , 7, 0, 0, , , ], [38, 1, Filler, , 0, 0, 0, , , ], [39, 8, Product, , 7, 0, 0, , , ], [72, 15, pmg dtl tech key, , 0, 0, 0, , , ], [87, 15, Case Pack id, , 0, 0, 0, , , ], [101, 50, Product Name, , 0, 0, 0, , , ]]') else: assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, Record Type, , 0, 0, 0, , , ], [3, 9, Pack Qty, , 8, 4, 0, , , ], [12, 13, Pack Cost, , 8, 4, 0, , , ], [25, 13, APN, , 7, 0, 0, , , ], [38, 1, Filler, , 0, 0, 0, , , ], [39, 8, Product, , 7, 0, 0, , , ], [72, 15, pmg dtl tech key, , 0, 0, 0, , , ], [87, 15, Case Pack id, , 0, 0, 0, , , ], [101, 50, Product Name, , 0, 0, 0, , , ]]') #select('TabbedPane', 'Extras') #select('TabbedPane', 'Fields') #select('Table', '') select('TextField', 'ams PO Download: Header%') select('TextField1', '%') select('RecordFieldsJTbl', 'cell:Description,4(Format YYMMDD)') assert_p('RecordFieldsJTbl', 'Text', 'Format YYMMDD', 'Description,4') select('RecordFieldsJTbl', 'cell:Description,9(Format YYMMDD)') if commonBits.version() == 'MsAccess': assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, Record Type, , 0, 0, 15, Ams PO Download, , ], [3, 5, Sequence Number, , 8, 3, 0, , , ], [8, 10, Vendor, , 7, 0, 0, , , ], [18, 12, PO, , 8, 0, 0, , , ], [30, 6, Entry Date, Format YYMMDD, 0, 0, 0, , , ], [36, 8, Filler, , 0, 0, 0, , , ], [44, 2, beg01 code, , 0, 0, 0, , , ], [46, 2, beg02 code, , 0, 0, 0, , , ], [48, 4, Department, , 0, 0, 0, , , ], [52, 6, Expected Reciept Date, Format YYMMDD, 0, 0, 0, , , ], [58, 6, Cancel by date, Format YYMMDD, 0, 0, 0, , , ], [68, 1, EDI Type, , 0, 0, 0, , , ], [69, 6, Add Date, Format YYMMDD, 0, 0, 0, , , ], [75, 1, Filler, , 0, 0, 0, , , ], [76, 10, Department Name, , 0, 0, 0, , , ], [86, 1, Prcoess Type, C/N Conveyable/Non-Conveyable, 0, 0, 0, , , ], [87, 2, Order Type, , 0, 0, 0, , , ]]') else: assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, Record Type, , 0, 0, 0, , , ], [3, 5, Sequence Number, , 8, 3, 0, , , ], [8, 10, Vendor, , 7, 0, 0, , , ], [18, 12, PO, , 8, 0, 0, , , ], [30, 6, Entry Date, Format YYMMDD, 0, 0, 0, , , ], [36, 8, Filler, , 0, 0, 0, , , ], [44, 2, beg01 code, , 0, 0, 0, , , ], [46, 2, beg02 code, , 0, 0, 0, , , ], [48, 4, Department, , 0, 0, 0, , , ], [52, 6, Expected Reciept Date, Format YYMMDD, 0, 0, 0, , , ], [58, 6, Cancel by date, Format YYMMDD, 0, 0, 0, , , ], [68, 1, EDI Type, , 0, 0, 0, , , ], [69, 6, Add Date, Format YYMMDD, 0, 0, 0, , , ], [75, 1, Filler, , 0, 0, 0, , , ], [76, 10, Department Name, , 0, 0, 0, , , ], [86, 1, Prcoess Type, C/N Conveyable/Non-Conveyable, 0, 0, 0, , , ], [87, 2, Order Type, , 0, 0, 0, , , ]]') select('RecordFieldsJTbl', 'cell:Description,9(Format YYMMDD)') click('ScrollPane$ScrollBar3', 570, 10) click('ScrollPane$ScrollBar3', 523, 10) commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Record Layouts>>Create Layout') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Record Layouts>>Layout Wizard') commonBits.doSleep() ##commonBits.doSleep() ##assert_p('Label9', 'Text', 'Data Base') ##assert_p('Label9', 'Text', 'System') assert_p('BmKeyedComboBox', 'Text', 'Default') assert_p('Label3', 'Text', 'Record Type') assert_p('Label4', 'Text', 'Font Name') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Record Layouts>>Load Cobol Copybook') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Record Layouts>>Edit System Table') select('TableListJTbl', 'cell:Details,1(EDI)') assert_p('TableListJTbl', 'Text', 'EDI', 'Details,1') select('TableListJTbl', 'cell:Details,5(Mainframe)') assert_p('TableListJTbl', 'Text', 'Mainframe', 'Details,5') select('TableListJTbl', 'cell:Details,5(Mainframe)') commonBits.closeWindow(click) ##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() + 'po/escapes_cr_in_msgid_and_msgstr.po') click(commonBits.fl('Edit') + '1') assert_p('TextArea', 'Text', '''msgid with _ _ escape ''') assert_p('TextArea1', 'Text', '''msgstr with _ _ escape ''') click('BasicInternalFrameTitlePane$NoFocusButton2') select('File_Txt', commonBits.sampleDir() + 'po/flags.po') click(commonBits.fl('Edit') + '1') select('TabbedPane', 'Fuzzy/Blank') select('TabbedPane', 'Fuzzy/Blank') ## select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,1(test2)') ## select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,1(test2)') ## select('PoList.FileDisplay_JTbl1', 'test3', '3|msgstr,2') ## select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,2(test3)') ## select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,2(test3)') select('Table1', 'cell:' + commonBits.fl('Line') + ',2(3)') assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[test1, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line]]' ) select('Table1', 'cell:' + commonBits.fl('Line') + ',2(3)') click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') ## select('PoList.FileDisplay_JTbl', '') rightclick('PoList.FileDisplay_JTbl', '2|msgid,0') select_menu(commonBits.fl('Show Column') + '>>fuzzy') assert_p( 'PoList.FileDisplay_JTbl', 'Content', '[[test1, test1, fuzzy then no-c-format on separate lines, Y], [test2, test2, no-c-format then fuzzy on separate lines, Y], [test3, test3, fuzzy then no-c-format on same line, Y], [test4, test4, no-c-format then fuzzy on same line, Y]]' ) assert_p( 'PoList.FileDisplay_JTbl', 'Content', '[[test1, test1, fuzzy then no-c-format on separate lines, Y], [test2, test2, no-c-format then fuzzy on separate lines, Y], [test3, test3, fuzzy then no-c-format on same line, Y], [test4, test4, no-c-format then fuzzy on same line, Y]]' ) ## select('Table', '') ## rightclick('PoList.FileDisplay_JTbl', '2|msgid,0') rightclick('Table', commonBits.fl('Line') + ',0') select_menu(commonBits.fl('Edit Record')) select('TabbedPane', 'Single PO Record') commonBits.doSleep() assert_p('TextArea14', 'Text', ''' no-c-format''') ## assert_p('TextArea11', 'Text', ''' ##no-c-format''') assert_p('TextArea11', 'Text', 'fuzzy then no-c-format on separate lines') assert_p('TextArea8', 'Text', 'test1') ## assert_p('TextArea10', 'Text', 'fuzzy then no-c-format on separate lines') assert_p('TextArea7', 'Text', 'test1') assert_p('Fuzzy', 'Text', 'true') click('Right') commonBits.doSleep() assert_p('TextArea14', 'Text', '''no-c-format ''') assert_p('Fuzzy', 'Text', 'true') assert_p('TextArea11', 'Text', 'no-c-format then fuzzy on separate lines') click('Right') assert_p('TextArea14', 'Text', 'no-c-format') assert_p('Fuzzy', 'Text', 'true') click('Right') assert_p('TextArea14', 'Text', 'no-c-format') assert_p('Fuzzy', 'Text', 'true') assert_p('TextArea11', 'Text', 'no-c-format then fuzzy on same line') click(commonBits.fl('Fuzzy/Blank')) select('TabbedPane', 'Fuzzy/Blank') select('Table1', 'cell:' + commonBits.fl('Line') + ',2(3)') assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[test1, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line]]' ) close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window(commonBits.applicationName()): select('FileNameTxtFld', commonBits.sampleDir() + 'protoStoreSales6.bin') click('Edit1') ##select('JTreeTable', '') rightclick('JTreeTable', 'Tree,0') select_menu('Fully Expand Tree') select('LayoutCombo', 'Product') assert_p('JTreeTable', 'Content', '[[, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, SALE, DEBIT_CARD], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ]]') ##select('JTreeTable', '') rightclick('JTreeTable', 'quantity,10') select_menu('Edit Record') assert_p('BaseLineAsColumn$LineAsColTbl', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , 1, 1], [price, 4, , 5010, 5010], [saleType, 5, , SALE, SALE], [paymentType, 6, , DEBIT_CARD, DEBIT_CARD]]') commonBits.doSleep() select('BaseLineAsColumn$LineAsColTbl', '', 'Data,5') select('BaseLineAsColumn$LineAsColTbl', 'cell:Data,2(1)') assert_p('BaseLineAsColumn$LineAsColTbl', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , 1, 1], [price, 4, , 5010, 5010], [saleType, 5, , SALE, SALE], [paymentType, 6, , , ]]') select('BaseLineAsColumn$LineAsColTbl', 'cell:Data,4(SALE)') select('BaseLineAsColumn$LineAsColTbl', 'OTHER', 'Data,4') ##select('Table', 'OTHER', 'Data,4') select('BaseLineAsColumn$LineAsColTbl', 'cell:Data,2(1)') assert_p('BaseLineAsColumn$LineAsColTbl', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , 1, 1], [price, 4, , 5010, 5010], [saleType, 5, , OTHER, OTHER], [paymentType, 6, , , ]]') select_menu('Window>>protoStoreSales6.bin>>Tree View') assert_p('JTreeTable', 'Content', '[[, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, OTHER, ], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ]]') select('JTreeTable', 'CREDIT_CARD', 'paymentType,10') ##select('JTreeTable', '') assert_p('JTreeTable', 'Content', '[[, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, OTHER, CREDIT_CARD], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ]]') select_menu('Window>>protoStoreSales6.bin>>Record:') select('BaseLineAsColumn$LineAsColTbl', 'cell:Text,2(1)') assert_p('BaseLineAsColumn$LineAsColTbl', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , 1, 1], [price, 4, , 5010, 5010], [saleType, 5, , OTHER, OTHER], [paymentType, 6, , CREDIT_CARD, CREDIT_CARD]]') commonBits.doSleep() select('BaseLineAsColumn$LineAsColTbl', '', 'Data,5') commonBits.doSleep() select('BaseLineAsColumn$LineAsColTbl', '', 'Data,5') select('BaseLineAsColumn$LineAsColTbl', 'cell:Data,2(1)') assert_p('BaseLineAsColumn$LineAsColTbl', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , 1, 1], [price, 4, , 5010, 5010], [saleType, 5, , OTHER, OTHER], [paymentType, 6, , , ]]') select_menu('Window>>protoStoreSales6.bin>>Tree View') select('JTreeTable', 'cell:saleDate,10(40118)') assert_p('JTreeTable', 'Content', '[[, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, OTHER, ], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ]]') select_menu('Window>>protoStoreSales6.bin>>Record:') ##select('BaseLineAsColumn$LineAsColTbl', '') select('BaseLineAsColumn$LineAsColTbl', 'cell:Text,5()') select('BaseLineAsColumn$LineAsColTbl', 'CHEQUE', 'Data,5') select('BaseLineAsColumn$LineAsColTbl', 'CHEQUE', 'Data,5') select('BaseLineAsColumn$LineAsColTbl', 'cell:Data,2(1)') assert_p('BaseLineAsColumn$LineAsColTbl', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , 1, 1], [price, 4, , 5010, 5010], [saleType, 5, , OTHER, OTHER], [paymentType, 6, , CHEQUE, CHEQUE]]') click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Window>>protoStoreSales6.bin>>Tree View') select('JTreeTable', 'cell:saleDate,10(40118)') assert_p('JTreeTable', 'Content', '[[, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, OTHER, CHEQUE], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ]]') click('BasicInternalFrameTitlePane$NoFocusButton2') if window('Save Changes to file: ' + commonBits.sampleDir() + 'protoStoreSales6.bin'): click('No') close() close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_03' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'zAms_LocDownload_20041228.csv') commonBits.setRecordLayout(select, 'Generic CSV - enter details') commonBits.doEdit(click) if window(''): # select('Table', '') select('CheckBox', 'false') assert_p('Table', 'Text', '5839', 'B,1') select('Table', 'cell:C,0(Loc_Type)') assert_p('Table', 'Text', 'DC', 'C,1') select('Table', 'cell:D,2(VIC West Ad Support)') assert_p('Table', 'Text', 'WA Ad Support', 'D,4') select('Table', 'cell:D,2(VIC West Ad Support)') select('CheckBox', 'true') # select('Table', '') assert_p('Table', 'Text', '5839', 'Loc_Nbr,0') select('Table', 'cell:Loc_Name,1(VIC West Ad Support)') assert_p('Table', 'Text', 'VIC West Ad Support', 'Loc_Name,1') select('Table', 'cell:Loc_Name,1(VIC West Ad Support)') commonBits.doSleep() click(commonBits.fl('Go')) commonBits.doSleep() close() commonBits.doSleep() commonBits.doSleep() select('Table', 'cell:4|Loc_Name,0(DC - Taras Ave)') assert_p('Table', 'Text', 'DC - Taras Ave', '4|Loc_Name,0') select('Table', 'cell:4|Loc_Name,4(Bankstown)') assert_p('Table', 'Text', 'Bankstown', '4|Loc_Name,4') select('Table', 'cell:4|Loc_Name,6(Blacktown)') assert_p('Table', 'Text', 'Rockdale', '4|Loc_Name,7') select('Table', 'cell:4|Loc_Name,2(NSW North Sydney Ad Support)') rightclick('Table', '3|Loc_Type,2') select_menu(commonBits.fl('Edit Record')) # select('Table1', 'cell:4|Loc_Name,2(NSW North Sydney Ad Support)') select('Table', 'cell:' + commonBits.fl('Data') + ',2(DC)') assert_p( 'Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5853, 5853], [Loc_Type, 3, , DC, DC], [Loc_Name, 4, , NSW North Sydney Ad Support, NSW North Sydney Ad Support], [Loc_Addr_Ln1, 5, , , ], [Loc_Addr_Ln2, 6, , , ], [Loc_Addr_Ln3, 7, , , ], [Loc_Postcode, 8, , , ], [Loc_State, 9, , , ], [Loc_Actv_Ind, 10, , A, A], [K, 11, , , ]]' ) select( 'Table', 'cell:' + commonBits.fl('Data') + ',3(NSW North Sydney Ad Support)') assert_p('Table', 'Text', 'NSW North Sydney Ad Support', commonBits.fl('Data') + ',3') select( 'Table', 'cell:' + commonBits.fl('Data') + ',3(NSW North Sydney Ad Support)') click('Right') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',6( 39-41 Allingham Street)') assert_p('Table', 'Text', ' 39-41 Allingham Street', commonBits.fl('Data') + ',6') select('Table', 'cell:' + commonBits.fl('Data') + ',4(Bankstown)') assert_p('Table', 'Text', 'Bankstown', commonBits.fl('Data') + ',4') select('Table', 'cell:' + commonBits.fl('Data') + ',1(5015)') assert_p( 'Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5015, 5015], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Bankstown, Bankstown], [Loc_Addr_Ln1, 5, , Bankstown, Bankstown], [Loc_Addr_Ln2, 6, , Unit 2, Unit 2], [Loc_Addr_Ln3, 7, , 39-41 Allingham Street, 39-41 Allingham Street], [Loc_Postcode, 8, , Condell Park, Condell Park], [Loc_State, 9, , 2200, 2200], [Loc_Actv_Ind, 10, , NSW, NSW], [K, 11, , A, A]]' ) close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_22' if window('Record Editor'): select('File_Txt', commonBits.sampleDir() + 'po/tst1Fuzzy.po') click(commonBits.fl('Edit') + '1') select('TabbedPane', 'Fuzzy/Blank') select('TabbedPane', 'Fuzzy/Blank') click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') click('Export') select('File Name_Txt', commonBits.sampleDir() + 'po/Z_tst1Fuzzy.po') select('Edit Output File_Chk', 'true') click(commonBits.fl('Save File')) select('TabbedPane', 'Fuzzy/Blank') select('TabbedPane', 'Fuzzy/Blank') assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[Red Hat Middleware, LLC., , ], [test1, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [blank msgstr, , ]]' ) click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') assert_p( 'PoList.FileDisplay_JTbl', 'Content', '[[HIBERNATE - Relational Persistence for Idiomatic Java, HIBERNATE - Relational Persistence for Idiomatic Java, ], [Red Hat Middleware, LLC., , ], [test1, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [obsolete1, obsolete1, Simple obsolete entry (obsolete1)], [obsolete2, , Plural obsolete entry (obsolete2)], [obsolete3, obsolete3, Simple obsolete entry with context (obsolete3)], [<ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter resources., <ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter , Multiline obsolete entry], [plural1, , Plural obsolete entry (plural 1)], [convert, omskakel, Test quotes, newlines and multiline.], [msgid with _\r_ escape\n, msgstr with _\r_ escape\n, ], [blank msgstr, , ]]' ) click(commonBits.fl('Fuzzy/Blank')) select('TabbedPane', 'Fuzzy/Blank') select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,1(test1)') select('TextArea2', 'test1aaa') ## select('PoList.FileDisplay_JTbl1', 'test3', '2|msgid,3') ## select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') ## select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') ## select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') click(commonBits.fl('Fuzzy/Blank')) select('TabbedPane', 'Fuzzy/Blank') select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') select('TextArea2', 'test3aa') # select('PoList.FileDisplay_JTbl1', 'test3', '3|msgstr,3') # select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,3(test3)') select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,3(test3)') assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[Red Hat Middleware, LLC., , ], [test1aaa, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [blank msgstr, , ]]' ) select('PoList.FileDisplay_JTbl1', 'cell:3|msgstr,3(test3)') click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') assert_p( 'PoList.FileDisplay_JTbl', 'Content', '[[HIBERNATE - Relational Persistence for Idiomatic Java, HIBERNATE - Relational Persistence for Idiomatic Java, ], [Red Hat Middleware, LLC., , ], [test1aaa, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [obsolete1, obsolete1, Simple obsolete entry (obsolete1)], [obsolete2, , Plural obsolete entry (obsolete2)], [obsolete3, obsolete3, Simple obsolete entry with context (obsolete3)], [<ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter resources., <ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter , Multiline obsolete entry], [plural1, , Plural obsolete entry (plural 1)], [convert, omskakel, Test quotes, newlines and multiline.], [msgid with _\r_ escape\n, msgstr with _\r_ escape\n, ], [blank msgstr, , ]]' ) select_menu( commonBits.fl('Utilities') + '>>' + commonBits.fl('Compare with Disk')) assert_p( 'Table', 'Content', '''[[, Old, 3, , test1, test1, fuzzy then no-c-format on separate lines, , , , , no-c-format, , , , Y, ], [, New, 3, , test1aaa, , , , , , , , , , , , ], [, Old, 5, , test3, test3, fuzzy then no-c-format on same line, , , , , no-c-format, , , , Y, ], [, New, 5, , test3aa, , , , , , , , , , , , ]]''' ) click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu( commonBits.fl('Window') + '>>Z_tst1Fuzzy.po>>' + commonBits.fl('PO List')) click('Save') click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu( commonBits.fl('Window') + '>>tst1Fuzzy.po>>' + commonBits.fl('PO List')) click('BasicInternalFrameTitlePane$NoFocusButton2') select('File_Txt', commonBits.sampleDir() + 'po/Z_tst1Fuzzy.po') click(commonBits.fl('Edit') + '1') select('TabbedPane', 'Fuzzy/Blank') select('TabbedPane', 'Fuzzy/Blank') ## commonBits.doSleep() commonBits.doSleep() assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[Red Hat Middleware, LLC., , ], [test1aaa, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [blank msgstr, , ]]' ) click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') assert_p( 'PoList.FileDisplay_JTbl', 'Content', '[[HIBERNATE - Relational Persistence for Idiomatic Java, HIBERNATE - Relational Persistence for Idiomatic Java, ], [Red Hat Middleware, LLC., , ], [test1aaa, test1, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [obsolete1, obsolete1, Simple obsolete entry (obsolete1)], [obsolete2, , Plural obsolete entry (obsolete2)], [obsolete3, obsolete3, Simple obsolete entry with context (obsolete3)], [<ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter resources., <ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter , Multiline obsolete entry], [plural1, , Plural obsolete entry (plural 1)], [convert, omskakel, Test quotes, newlines and multiline.], [msgid with _\r_ escape\n, msgstr with _\r_ escape\n, ], [blank msgstr, , ]]' ) select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,4(test3)') select('TextArea', 'test3aa') ## select('PoList.FileDisplay_JTbl', 'test4', '3|msgstr,5') click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,5(test4)') select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,5(test4)') # select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,2(test1)') ## select('TextArea', 'test2') # select('PoList.FileDisplay_JTbl', 'test2', '3|msgstr,3') # select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,3(test2)') # select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,3(test2)') select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,2(test1)') select('TextArea', 'test1aa') # select('TextArea2', 'test1aa') ### select('PoList.FileDisplay_JTbl1', 'test3', '2|msgid,3') ## select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') ## select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') ## select('PoList.FileDisplay_JTbl1', 'cell:2|msgid,3(test3)') click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') select('PoList.FileDisplay_JTbl', 'cell:3|msgstr,3(test3)') # select('TextArea2', 'test3aa') click(commonBits.fl('Fuzzy/Blank')) select('TabbedPane', 'Fuzzy/Blank') assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[Red Hat Middleware, LLC., , ], [test1aaa, test1aa, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3aa, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [blank msgstr, , ]]' ) select_menu( commonBits.fl('Utilities') + '>>' + commonBits.fl('Compare with Disk')) assert_p( 'Table', 'Content', '''[[, Old, 3, , test1aaa, test1, fuzzy then no-c-format on separate lines, , , , , no-c-format, , , , Y, ], [, New, 3, , , test1aa, , , , , , , , , , , ], [, Old, 5, , test3aa, test3, fuzzy then no-c-format on same line, , , , , no-c-format, , , , Y, ], [, New, 5, , , test3aa, , , , , , , , , , , ]]''' ) click('BasicInternalFrameTitlePane$NoFocusButton2') click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') click('Save') click('BasicInternalFrameTitlePane$NoFocusButton2') click(commonBits.fl('Edit') + '1') select('TabbedPane', 'Fuzzy/Blank') select('TabbedPane', 'Fuzzy/Blank') commonBits.doSleep() assert_p( 'PoList.FileDisplay_JTbl1', 'Content', '[[Red Hat Middleware, LLC., , ], [test1aaa, test1aa, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3aa, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [blank msgstr, , ]]' ) click(commonBits.fl('PO List')) select('TabbedPane', 'PO List') assert_p( 'PoList.FileDisplay_JTbl', 'Content', '[[HIBERNATE - Relational Persistence for Idiomatic Java, HIBERNATE - Relational Persistence for Idiomatic Java, ], [Red Hat Middleware, LLC., , ], [test1aaa, test1aa, fuzzy then no-c-format on separate lines], [test2, test2, no-c-format then fuzzy on separate lines], [test3aa, test3aa, fuzzy then no-c-format on same line], [test4, test4, no-c-format then fuzzy on same line], [obsolete1, obsolete1, Simple obsolete entry (obsolete1)], [obsolete2, , Plural obsolete entry (obsolete2)], [obsolete3, obsolete3, Simple obsolete entry with context (obsolete3)], [<ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter resources., <ulink url="http://www.redhat.com/support/resources/networking/firewall.html">http://www.redhat.com/support/resources/networking/firewall.html</ulink> — Provides links to a variety of up-to-date packet filter , Multiline obsolete entry], [plural1, , Plural obsolete entry (plural 1)], [convert, omskakel, Test quotes, newlines and multiline.], [msgid with _\r_ escape\n, msgstr with _\r_ escape\n, ], [blank msgstr, , ]]' ) close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'DTAR020_tst1.bin') select('ComboBox2', 'Unknown Format') commonBits.doEdit(click) if window(''): select('TextField1', 'cp037') select('Table', 'cell:A,1(6)') ## select('Table', '') if commonBits.isVersion82(): assert_p('TextField', 'Text', '27') elif commonBits.isVersion80(): assert_p('TextField', 'Text', '138') else: assert_p('TextField', 'Text', '100') ##select('BmKeyedComboBox', '2') select('BmKeyedComboBox', 'Fixed Length Binary') select('TextField', '40') select('TextField1', 'cp037') assert_p('Table', 'RowCount', '12') assert_p('Table', 'ColumnCount', '40') select('TextField', '54') select('TextField1', 'cp037') ## select('Table', '') assert_p('TextField', 'Text', '54') select('TextField1', 'cp037') assert_p('Table', 'RowCount', '9') assert_p('Table', 'ColumnCount', '54') select('TextField', '27') select('TextField1', 'cp037') assert_p('Table', 'RowCount', '17') commonBits.doSleep() click('Go') commonBits.doSleep() close() rightclick('Table', '1 - 27|Data,1') select_menu('Edit Record') ## select('Table1', '''cell:1 - 27|Data,1(69684558 assert_p('Table', 'Text', 'f6f9f6f8f4f5f5f8020c0040118c280c000000001c00000001900c', 'Hex,0') select_menu('Window>>DTAR020_tst1.bin>>Table:') select('LayoutCombo', 'Hex 1 Line') ## assert_p('Table', 'Content', '[[[B@cd2bfc], [[B@8fb561], [[B@1304ef4], [[B@fa8cc6], [[B@2d14a], [[B@1cf6930], [[B@14bf534], [[B@9bee93], [[B@23c5ff], [[B@496381], [[B@f02db7], [[B@6d3209], [[B@fc7ceb], [[B@22d5b5], [[B@1b5080a], [[B@5e95ae], [[B@1ada1e0]]') select_menu('Edit>>Change Layout') select('ComboBox1', 'Mainframe') click('Go') ## click('MetalInternalFrameTitlePane', 464, 10) ##commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select_menu('Window>>DTAR020_tst1.bin>>Table:') assert_p( 'Table', 'Content', '[[63604808, 20, 40118, 170, 1, 4.87], [69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [61684613, 59, 40118, 335, 1, 12.99], [68634752, 59, 40118, 410, 1, 8.99], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [60614487, 59, 40118, 878, 1, 5.95], [68654655, 166, 40118, 60, 1, 5.08], [69624033, 166, 40118, 80, 1, 18.19], [60604100, 166, 40118, 80, 1, 13.30], [68674560, 166, 40118, 170, 1, 5.99]]' ) assert_p( 'Table', 'Content', '[[63604808, 20, 40118, 170, 1, 4.87], [69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [61684613, 59, 40118, 335, 1, 12.99], [68634752, 59, 40118, 410, 1, 8.99], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [60614487, 59, 40118, 878, 1, 5.95], [68654655, 166, 40118, 60, 1, 5.08], [69624033, 166, 40118, 80, 1, 18.19], [60604100, 166, 40118, 80, 1, 13.30], [68674560, 166, 40118, 170, 1, 5.99]]' ) commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') click('Open') select('ComboBox1', 'Mainframe') click('Edit1') assert_p( 'Table', 'Content', '[[63604808, 20, 40118, 170, 1, 4.87], [69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [61684613, 59, 40118, 335, 1, 12.99], [68634752, 59, 40118, 410, 1, 8.99], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [60614487, 59, 40118, 878, 1, 5.95], [68654655, 166, 40118, 60, 1, 5.08], [69624033, 166, 40118, 80, 1, 18.19], [60604100, 166, 40118, 80, 1, 13.30], [68674560, 166, 40118, 170, 1, 5.99]]' ) 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') select_menu( commonBits.fl('View') + '>>' + commonBits.fl('Record Based Tree')) commonBits.doSleep() select('Recs_JTbl', 'ams PO Download: Header', commonBits.fl('Parent Record') + ',0') select('Recs_JTbl', 'ams PO Download: Detail', commonBits.fl('Parent Record') + ',2') select('Recs_JTbl', 'cell:' + commonBits.fl('Parent Record') + ',2(0)') click(commonBits.fl('Build')) select('LineTree.FileDisplay_JTbl', 'cell:' + commonBits.fl('Tree') + ',0(null)') click('Find') ##click('MetalInternalFrameTitlePane', 155, 14) select('Find.Search For_Txt', '00') commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '1, 6, 0') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Tree View')) select('LineTree.FileDisplay_JTbl', 'cell:beg01 code,0(00)') assert_p('LineTree.Layouts_Txt', 'Text', 'ams PO Download: Header') select('LineTree.FileDisplay_JTbl', 'cell:beg01 code,0(00)') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find')) ##select('LineTree.FileDisplay_JTbl', 'cell:beg01 code,0(00)') commonBits.find(click) #click('Find1') assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '1, 8, 1') commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '2, 1, 2') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Tree View')) select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,1(7.0000)') assert_p('LineTree.Layouts_Txt', 'Text', 'ams PO Download: Detail') select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,1(7.0000)') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find')) ##select_menu(commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find')) #select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,1(7.0000)') ##assert_p('TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '2, 1, 2') commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '2, 1, 4') commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '2, 2, 2') commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '2, 3, 5') commonBits.find(click) commonBits.find(click) commonBits.find(click) commonBits.find(click) commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '4, 1, 2') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Tree View')) select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,3(4.0000)') assert_p('LineTree.Layouts_Txt', 'Text', 'ams PO Download: Detail') select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,3(4.0000)') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find')) ##select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,3(4.0000)') ##assert_p('TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '4, 1, 2') commonBits.find(click) commonBits.find(click) commonBits.find(click) commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '6, 1, 3') commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '6, 1, 5') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Tree View')) select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,5(48.0000)') assert_p('LineTree.Layouts_Txt', 'Text', 'ams PO Download: Detail') select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,5(48.0000)') #s = commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find') #select_menu(s) select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find')) #select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,5(48.0000)') ##assert_p('TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '6, 1, 5') commonBits.find(click) commonBits.find(click) commonBits.find(click) commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '9, 1, 4') commonBits.find(click) commonBits.find(click) commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '11, 6, 0') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Tree View')) select('LineTree.FileDisplay_JTbl', 'cell:beg01 code,10(00)') assert_p('LineTree.Layouts_Txt', 'Text', 'ams PO Download: Header') select('LineTree.FileDisplay_JTbl', 'cell:beg01 code,10(00)') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Find')) #select('LineTree.FileDisplay_JTbl', 'cell:beg01 code,10(00)') commonBits.find(click) commonBits.find(click) assert_p( 'TextField', 'Text', commonBits.fl('Found (line, field Num, field position)=') + '12, 1, 3') select_menu( commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' + commonBits.fl('Tree View')) select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,11(16.0000)') assert_p('LineTree.Layouts_Txt', 'Text', 'ams PO Download: Detail') select('LineTree.FileDisplay_JTbl', 'cell:Pack Qty,11(16.0000)') click('BasicInternalFrameTitlePane$NoFocusButton2') click('BasicInternalFrameTitlePane$NoFocusButton2') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_22' if window(commonBits.applicationName()): select('File_Txt', commonBits.sampleDir() + 'xTestExt01b.bin') select('Proto Definition_Txt', commonBits.stdCopybookDir() + 'Extension01.proto') assert_p('Type of Definition_Txt', 'Text', 'Proto Definition') commonBits.doSleep() assert_p('Proto Definition_Txt', 'Text', commonBits.stdCopybookDir() + 'Extension01.proto') assert_p('Proto Definition_Txt', 'Text', commonBits.stdCopybookDir() + 'Extension01.proto') commonBits.doSleep() assert_p('Proto File_Txt', 'Text', 'Extension01.proto') assert_p('Primary Message_Txt', 'Text', 'Message') click('Edit1') select('TabbedPane', 'Record: ') select('LineFrameTree.FileDisplay_JTbl', '123', 'Data,0') select('LineFrameTree.FileDisplay_JTbl', 'n 123', 'Data,1') select('LineFrameTree.FileDisplay_JTbl', 'cell:Data,0(123)') ## assert_p('LineFrameTree.FileDisplay_JTbl', 'Content', '[[A, 1, , UINT64, 123, 123], [name, 1, , STRING, n 123, n 123]]') assert_p( 'LineFrameTree.FileDisplay_JTbl', 'Content', '[[A, 1, , UINT64, 123, 123], [name, 2, , STRING, n 123, n 123]]') click('New2') select('TabbedPane', 'Record:') select('LineFrameTree.FileDisplay_JTbl1', '456', 'Data,0') select('LineFrameTree.FileDisplay_JTbl1', 'cell:Text,0(456)') assert_p('LineFrameTree.FileDisplay_JTbl1', 'Content', '[[B, 1, , UINT64, 456, 456]]') select('LineFrameTree.FileDisplay_JTbl1', 'cell:Text,0(456)') click('Tree View') select('TabbedPane', 'Tree View') select('LineTreeChild.FileDisplay_JTbl', 'cell:Tree,0(null)') rightclick('LineTreeChild.FileDisplay_JTbl', 'Tree,0') select_menu('Fully Expand Tree') assert_p('LineTreeChild.FileDisplay_JTbl', 'Content', '[[, , 123, n 123], [, , , ]]') select('LineTreeChild.Layouts_Txt', 'Prefered') assert_p('LineTreeChild.FileDisplay_JTbl', 'Content', '[[, , 123, n 123], [, , 456, ]]') select('LineTreeChild.FileDisplay_JTbl', 'cell:Tree,0(null)') click('New1') click('BasicInternalFrameTitlePane$NoFocusButton1') click('MetalInternalFrameTitlePane', 302, 11) assert_p('TextArea3', 'Text', ''' Only one record allowed in the file''') click('Save') click('MetalInternalFrameTitlePane', 511, 11) click('BasicInternalFrameTitlePane$NoFocusButton2') click('Edit1') select('LineTreeChild.Layouts_Txt', 'Prefered') assert_p('LineTreeChild.FileDisplay_JTbl', 'Content', '[[, , 123, n 123], [, , 456, ]]') select('LineTreeChild.FileDisplay_JTbl', 'cell:Tree,0(null)') click('New1') click('Delete2') click('Save1') click('BasicInternalFrameTitlePane$NoFocusButton2') assert_p( 'TextArea1', 'Text', ''' Only one record allowed in the file Only one record allowed in the file''') close()
def test(): from Modules import commonBits import time java_recorded_version = '1.6.0_10' if window('Record Editor'): commonBits.selectOldFilemenu(select_menu, 'Utilities', 'File Copy Menu') click('*3') select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') select('FileChooser1', commonBits.sampleDir() + 'barDTAR020.csv') commonBits.setRecordLayout2(select, 'DTAR020') select('DelimiterCombo', '|') click('Right') select('TabbedPane', '') select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)') assert_p( 'Table1', 'Content', '[[KEYCODE-NO, true], [STORE-NO, true], [DATE, true], [DEPT-NO, true], [QTY-SOLD, true], [SALE-PRICE, true]]' ) ## select('Table1', '') select('Table', 'cell:' + commonBits.fl('Record') + ',0(DTAR020)') doubleclick('Table', commonBits.fl('Record') + ',0') assert_p('Table', 'Content', '[[DTAR020, true]]') select('Table', 'cell:' + commonBits.fl('Record') + ',0(DTAR020)') click('Right') select('TabbedPane', '') # click(commonBits.fl('Choose File')) # if window('Open'): # click('Cancel') # close() # click(commonBits.fl('Choose File')) # if window('Open'): # click('Cancel') # close() select('FileChooser', commonBits.userDir() + 'CpyDTAR020barCsv.xml') commonBits.save1(click) commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') click('*') select('FileChooser', commonBits.userDir() + 'CpyDTAR020barCsv.xml') click(commonBits.fl('Run Copy Dialog')) assert_p('FileChooser', 'Text', commonBits.sampleDir() + 'DTAR020.bin') assert_p('FileChooser1', 'Text', commonBits.sampleDir() + 'barDTAR020.csv') if commonBits.isRecordEditor(): assert_p('ComboBox2', 'Text', 'DTAR020') assert_p('DelimiterCombo', 'Text', '|') click('Right') select('TabbedPane', '') select('Table', 'cell:' + commonBits.fl('Record') + ',0(DTAR020)') select('Table', 'cell:' + commonBits.fl('Record') + ',0(DTAR020)') doubleclick('Table', commonBits.fl('Record') + ',0') assert_p('Table', 'Text', 'DTAR020', commonBits.fl('Record') + ',0') select('Table', 'cell:' + commonBits.fl('Record') + ',0(DTAR020)') select('Table1', 'cell:' + commonBits.fl('Field') + ',0(KEYCODE-NO)') assert_p( 'Table1', 'Content', '[[KEYCODE-NO, true], [STORE-NO, true], [DATE, true], [DEPT-NO, true], [QTY-SOLD, true], [SALE-PRICE, true]]' ) select('Table1', 'cell:' + commonBits.fl('Field') + ',0(KEYCODE-NO)') click('Right') select('TabbedPane', '') ##click('Copy2') commonBits.copy(click) assert_p('TextField1', 'Text', commonBits.fl('Copy Done !!!')) commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') click('Open') select('FileChooser', commonBits.sampleDir() + 'barDTAR020.csv') select('ComboBox2', 'Generic CSV - enter details') commonBits.doEdit(click) if window(''): select('CheckBox', 'true') assert_p('DelimiterCombo', 'Text', '|') select('Table', 'cell:DATE,3(40118)') assert_p( 'Table', 'Content', '[[69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70], [65674532, 20, 40118, 929, 1, 3.59], [64614401, 59, 40118, 957, 1, 1.99], [64614401, 59, 40118, 957, 1, 1.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [68634752, 59, 40118, 410, 1, 8.99], [60614487, 59, 40118, 878, 1, 5.95], [63644339, 59, 40118, 878, 1, 12.65], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [62684217, 59, 40118, 957, 1, 9.99], [67674686, 59, 40118, 929, 1, 3.99], [61684613, 59, 40118, 335, 1, 12.99], [64624770, 59, 40118, 957, 1, 2.59], [69694814, 166, 40118, 360, 1, 2.50], [69694814, 166, 40118, 360, 1, 2.50], [69644164, 166, 40118, 193, 1, 21.59]]' ) select('Table', 'cell:DATE,3(40118)') commonBits.doSleep() click(commonBits.fl('Go')) close() commonBits.doSleep() select('Table', 'cell:4|DEPT-NO,0(280)') assert_p('Table', 'Text', 'cell:4|DEPT-NO,0(280)') select('Table', 'cell:1|KEYCODE-NO,1(69684558)') rightclick('Table', '1|KEYCODE-NO,1') select_menu(commonBits.fl('Edit Record')) ## select('Table1', 'cell:1|KEYCODE-NO,1(69684558)') select('Table', 'cell:' + commonBits.fl('Data') + ',0(69684558)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69684558, 69684558], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , -1, -1], [SALE-PRICE, 6, , -19.00, -19.00]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',0(69684558)') click('TextArea') assert_p('TextArea', 'Text', '69684558|20|40118|280|-1|-19.00') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69684558, 69684558], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 5.01, 5.01]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') assert_p('TextArea', 'Text', '69684558|20|40118|280|1|5.01') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 19.00, 19.00]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') click('TextArea') assert_p('TextArea', 'Text', '69694158|20|40118|280|1|19.00') click('Right') click('Right') select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 5.01, 5.01]]' ) select('Table', 'cell:' + commonBits.fl('Data') + ',2(40118)') click('TextArea') click('TextArea') assert_p('TextArea', 'Text', '69694158|20|40118|280|1|5.01') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'Unknown_Ams_LocDownload_20041228.txt') commonBits.setRecordLayout(select, 'Unknown Text IO') click('Edit1') click('Find1') ## click('MetalInternalFrameTitlePane', 177, 12) select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Table:') select('Table', 'rows:[4,5,6,7,8,9,10,11,12,13,14,15],columns:[1 - 1|Data]') select_menu('View>>Column View #{Selected Records#}') ### select('Table2', 'rows:[4,5,6,7,8,9,10,11,12,13,14,15],columns:[1 - 1|Data]') select( 'Table', 'cell:Row 2,0(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)' ) rightclick('Table', 'Row 2,0') select_menu('Edit Record') select( 'Table1', 'cell:Row 2,0(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)' ) click('Find1') commonBits.doSleep() select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Table:') select('Table', 'rows:[4,5,6,7,8,9,10,11,12,13,14,15],columns:[1 - 1|Data]') ## select('Table', 'rows:[4,5,6,7,8,9,10,11,12,13,14,15],columns:[1 - 1|Data]') select_menu('Edit>>Change Layout') ## select('Table', 'rows:[4,5,6,7,8,9,10,11,12,13,14,15],columns:[1 - 1|Data]') ## select('ComboBox2', 'ams PO Download') select('ComboBox2', 'ams Store') click('Go') ## select('Table', '') rightclick('Table', '10 - 35|Loc Name,9') select_menu('Edit Record') select('Table', 'cell:Data,5(11 Melissa Place)') assert_p( 'Table', 'Content', '[[Brand Id, 1, 3, TAR, TAR], [Loc Nbr, 4, 4, 5052, 5052], [Loc Type, 8, 2, ST, ST], [Loc Name, 10, 35, Eastwood, Eastwood], [Loc Addr Ln1, 45, 40, Marayong Offsite Reserve, Marayong Offsite Reserve], [Loc Addr Ln2, 85, 40, 11 Melissa Place, 11 Melissa Place], [Loc Addr Ln3, 125, 35, Marayong, Marayong], [Loc Postcode, 160, 10, 2148, 2148], [Loc State, 170, 3, NSW, NSW], [Loc Actv Ind, 173, 1, A, A]]' ) select('Table', 'cell:Data,5(11 Melissa Place)') select_menu( 'Window>>Unknown_Ams_LocDownload_20041228.txt>>Column Table') ## select('Table2', 'cell:Data,5(11 Melissa Place)') assert_p( 'Table', 'Content', '[[TAR, TAR, TAR, TAR, TAR, TAR, TAR, TAR, TAR, TAR, TAR, TAR], [5015, 5019, 5033, 5035, 5037, 5052, 5055, 5060, 5070, 5074, 5078, 5081], [ST, ST, ST, ST, ST, ST, ST, ST, ST, ST, ST, ST], [Bankstown, Penrith, Blacktown, Rockdale, Miranda, Eastwood, Leichhardt, St Marys, Bass Hill, Campbelltown, Warringah Mall, Ashfield], [Bankstown, Penrith, Marayong, Building B, Portside DC, Westfield Shoppingtown, Marayong Offsite Reserve, Marketown, St. Mary\'s, Bass Hill Plaza, Campbelltown Mall, Frenchs Forest, Ashfield Mall], [Unit 2, 39-41 Allingham Street, 58 Leland Street, Dock 2, 11 Melissa Place, 2-8 Mc Pherson Street, Cnr. Urunga Pde & The Kingsway, 11 Melissa Place, Marion Street, Charles Hackett Drive, 753 Hume Highway, 303 Queen Street, Units 2-3, 14 Aquatic Drive, Knox Street], [Condell Park, Penrith, Marayong, Botany, Miranda, Marayong, Leichhardt, St Mary\'s, Bass Hill, Campbelltown, Frenchs Forest, Ashfield], [2200, 2750, 2148, 2019, 2228, 2148, 2040, 2760, 2197, 2560, 2086, 2131], [NSW, NSW, NSW, NSW, NSW, NSW, NSW, NSW, NSW, NSW, NSW, NSW], [A, A, A, A, A, A, A, A, A, A, A, A]]' ) select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Record:1') select('Table', 'cell:Data,5(11 Melissa Place)') select('Table', 'cell:Data,5(11 Melissa Place)') assert_p( 'Table', 'Content', '[[Brand Id, 1, 3, TAR, TAR], [Loc Nbr, 4, 4, 5052, 5052], [Loc Type, 8, 2, ST, ST], [Loc Name, 10, 35, Eastwood, Eastwood], [Loc Addr Ln1, 45, 40, Marayong Offsite Reserve, Marayong Offsite Reserve], [Loc Addr Ln2, 85, 40, 11 Melissa Place, 11 Melissa Place], [Loc Addr Ln3, 125, 35, Marayong, Marayong], [Loc Postcode, 160, 10, 2148, 2148], [Loc State, 170, 3, NSW, NSW], [Loc Actv Ind, 173, 1, A, A]]' ) ## select('Table', 'cell:Data,5(11 Melissa Place)') select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Find') ## select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Find') ## zzzz ## select('Table', 'cell:Data,5(11 Melissa Place)') ## Error in replay ## assert_p('LayoutCombo', 'Content', '[[ams Store]]') assert_p('LayoutCombo', 'Text', 'ams Store') select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Find1') ## assert_p('LayoutCombo', 'Text', 'ams Store') ## Error in replay ## assert_p('LayoutCombo', 'Content', '[[ams Store]]') select('TextField', 'st') ## select('ComboBox', 'Loc Type') click('Find1') click('Find1') select_menu('Window>>Unknown_Ams_LocDownload_20041228.txt>>Record:') ## assert_p('Table', 'Content', '[[Brand Id, 1, 3, TAR, TAR, 544152], [Loc Nbr, 4, 4, 5035, 5035, 35303335], [Loc Type, 8, 2, ST, ST, 5354], [Loc Name, 10, 35, Rockdale, Rockdale, 526f636b64616c65202020202020202020202020202020202020202020202020202020], [Loc Addr Ln1, 45, 40, Building B, Portside DC, Building B, Portside DC, 4275696c64696e6720422c2020506f72747369646520444320202020202020202020202020202020], [Loc Addr Ln2, 85, 40, 2-8 Mc Pherson Street, 2-8 Mc Pherson Street, 322d38204d632050686572736f6e2053747265657420202020202020202020202020202020202020], [Loc Addr Ln3, 125, 35, Botany, Botany, 426f74616e792020202020202020202020202020202020202020202020202020202020], [Loc Postcode, 160, 10, 2019, 2019, 32303139202020202020], [Loc State, 170, 3, NSW, NSW, 4e5357], [Loc Actv Ind, 173, 1, A, A, 41]]') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_10' if window('Record Editor'): commonBits.selectOldFilemenu(select_menu, 'Utilities', 'File Copy Menu') click('*3') select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') select('FileChooser1', commonBits.sampleDir() + 'XfeDTAR020.csv') commonBits.setRecordLayout2(select, 'DTAR020') ## click('ScrollPane$ScrollBar', 3, 37) ## select('TextField', 'x\'fe\'') select('DelimiterCombo', 'x\'FE\'') click('Right') select('TabbedPane', '') click('Right') select('TabbedPane', '') click('Copy2') assert_p('TextField1', 'Text', 'Copy Done !!! ') click('Open') select('FileChooser', commonBits.sampleDir() + 'XfeDTAR020.csv') select('ComboBox2', 'Generic CSV - enter details') commonBits.doEdit(click) if window(''): select('CheckBox', 'true') assert_p('DelimiterCombo', 'Text', 'x\'FE\'') assert_p('Table', 'Text', '69684558', 'KEYCODE-NO,0') select('Table', 'cell:DATE,0(40118)') assert_p('Table', 'Text', '40118', 'DATE,0') select('Table', 'cell:DEPT-NO,1(280)') ## assert_p('Table', 'Content', '[[69684558, 20, 40118, 280, 1], [69684558, 20, 40118, 280, -1], [69684558, 20, 40118, 280, 1], [69694158, 20, 40118, 280, 1], [69694158, 20, 40118, 280, -1], [69694158, 20, 40118, 280, 1], [63604808, 20, 40118, 170, 1], [62684671, 20, 40118, 685, 1], [62684671, 20, 40118, 685, -1], [64634429, 20, 40118, 957, 1], [66624458, 20, 40118, 957, 1], [63674861, 20, 40118, 957, 10], [65674532, 20, 40118, 929, 1], [64614401, 59, 40118, 957, 1], [64614401, 59, 40118, 957, 1], [61664713, 59, 40118, 335, 1], [61664713, 59, 40118, 335, -1], [68634752, 59, 40118, 410, 1], [60614487, 59, 40118, 878, 1], [63644339, 59, 40118, 878, 1], [60694698, 59, 40118, 620, 1], [60664659, 59, 40118, 620, 1], [62684217, 59, 40118, 957, 1], [67674686, 59, 40118, 929, 1], [61684613, 59, 40118, 335, 1], [64624770, 59, 40118, 957, 1], [69694814, 166, 40118, 360, 1], [69694814, 166, 40118, 360, 1], [69644164, 166, 40118, 193, 1]]') assert_p( 'Table', 'Content', '[[69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70], [65674532, 20, 40118, 929, 1, 3.59], [64614401, 59, 40118, 957, 1, 1.99], [64614401, 59, 40118, 957, 1, 1.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [68634752, 59, 40118, 410, 1, 8.99], [60614487, 59, 40118, 878, 1, 5.95], [63644339, 59, 40118, 878, 1, 12.65], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [62684217, 59, 40118, 957, 1, 9.99], [67674686, 59, 40118, 929, 1, 3.99], [61684613, 59, 40118, 335, 1, 12.99], [64624770, 59, 40118, 957, 1, 2.59], [69694814, 166, 40118, 360, 1, 2.50], [69694814, 166, 40118, 360, 1, 2.50], [69644164, 166, 40118, 193, 1, 21.59]]' ) select('Table', 'cell:DEPT-NO,1(280)') commonBits.doSleep() select('TabbedPane', 'Normal') click('Go') commonBits.doSleep() commonBits.doSleep() close() commonBits.doSleep() commonBits.doSleep() select_menu('Window>>XfeDTAR020.csv>>Table:') select('Table', 'cell:1|KEYCODE-NO,0(69684558)') assert_p('Table', 'Text', '69684558', '1|KEYCODE-NO,1') select('Table', 'cell:2|STORE-NO,0(20)') assert_p('Table', 'Text', '20', '2|STORE-NO,0') select('Table', 'cell:3|DATE,0(40118)') assert_p('Table', 'Text', '40118', '3|DATE,0') select('Table', 'cell:4|DEPT-NO,0(280)') assert_p('Table', 'Text', '280', '4|DEPT-NO,1') select('Table', 'cell:5|QTY-SOLD,0(1)') assert_p('Table', 'Text', '-1', '5|QTY-SOLD,1') select('Table', 'cell:1|KEYCODE-NO,2(69684558)') rightclick('Table', '1|KEYCODE-NO,2') select_menu('Edit Record') ## select('Table1', 'cell:1|KEYCODE-NO,2(69684558)') select('Table', 'cell:Data,0(69684558)') assert_p('Table', 'Text', '20', 'Data,1') select('Table', 'cell:Data,0(69684558)') ## assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69684558, 69684558], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1]]') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69684558, 69684558], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 5.01, 5.01]]' ) select('Table', 'cell:Data,0(69684558)') click('Right') select('Table', 'cell:Data,0(69694158)') ## assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1]]') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 19.00, 19.00]]' ) select('Table', 'cell:Data,0(69694158)') click('Right') select('Table', 'cell:Data,0(69694158)') ## assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , -1, -1]]') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , -1, -1], [SALE-PRICE, 6, , -19.00, -19.00]]' ) select('Table', 'cell:Data,0(69694158)') click('Right') select('Table', 'cell:Data,3(280)') assert_p('Table', 'Text', '1', 'Data,4') select('Table', 'cell:Data,0(69694158)') ## assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1]]') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 5.01, 5.01]]' ) select('Table', 'cell:Data,0(69694158)') click('Right') select('Table', 'cell:Data,0(63604808)') ## assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 63604808, 63604808], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 170, 170], [QTY-SOLD, 5, , 1, 1]]') assert_p( 'Table', 'Content', '[[KEYCODE-NO, 1, , 63604808, 63604808], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 170, 170], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 4.87, 4.87]]' ) select('Table', 'cell:Data,0(63604808)') select_menu('Window>>XfeDTAR020.csv>>Table:') ## select('Table2', 'cell:Data,0(63604808)') select('Table', 'cell:1|KEYCODE-NO,2(69684558)') select('Table', 'cell:1|KEYCODE-NO,4(69694158)') assert_p('Table', 'RowCount', '379') select('Table', 'cell:1|KEYCODE-NO,8(62684671)') assert_p('Table', 'ColumnCount', '6') select('Table', 'cell:1|KEYCODE-NO,8(62684671)') commonBits.selectOldFilemenu(select_menu, 'Utilities', 'Compare Menu') ## select('Table', 'cell:1|KEYCODE-NO,8(62684671)') click('*1') select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') select('FileChooser1', commonBits.sampleDir() + 'SampleFiles' + commonBits.fileSep()) commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') click('*2') select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin') click('Right') select('TabbedPane', '') select('FileChooser', commonBits.sampleDir() + 'XfeDTAR020.csv') click('Right') if window(''): select('TextField', 'x\'FE\'') select('CheckBox', 'true') ## select('Table', '') assert_p('Table', 'Text', '20', 'STORE-NO,0') select('Table', 'cell:DATE,1(40118)') ### assert_p('Table', 'Content', '[[69684558, 20, 40118, 280, 1], [69684558, 20, 40118, 280, -1], [69684558, 20, 40118, 280, 1], [69694158, 20, 40118, 280, 1], [69694158, 20, 40118, 280, -1], [69694158, 20, 40118, 280, 1], [63604808, 20, 40118, 170, 1], [62684671, 20, 40118, 685, 1], [62684671, 20, 40118, 685, -1], [64634429, 20, 40118, 957, 1], [66624458, 20, 40118, 957, 1], [63674861, 20, 40118, 957, 10], [65674532, 20, 40118, 929, 1], [64614401, 59, 40118, 957, 1], [64614401, 59, 40118, 957, 1], [61664713, 59, 40118, 335, 1], [61664713, 59, 40118, 335, -1], [68634752, 59, 40118, 410, 1], [60614487, 59, 40118, 878, 1], [63644339, 59, 40118, 878, 1], [60694698, 59, 40118, 620, 1], [60664659, 59, 40118, 620, 1], [62684217, 59, 40118, 957, 1], [67674686, 59, 40118, 929, 1], [61684613, 59, 40118, 335, 1], [64624770, 59, 40118, 957, 1], [69694814, 166, 40118, 360, 1], [69694814, 166, 40118, 360, 1], [69644164, 166, 40118, 193, 1]]') assert_p( 'Table', 'Content', '[[69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70], [65674532, 20, 40118, 929, 1, 3.59], [64614401, 59, 40118, 957, 1, 1.99], [64614401, 59, 40118, 957, 1, 1.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [68634752, 59, 40118, 410, 1, 8.99], [60614487, 59, 40118, 878, 1, 5.95], [63644339, 59, 40118, 878, 1, 12.65], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [62684217, 59, 40118, 957, 1, 9.99], [67674686, 59, 40118, 929, 1, 3.99], [61684613, 59, 40118, 335, 1, 12.99], [64624770, 59, 40118, 957, 1, 2.59], [69694814, 166, 40118, 360, 1, 2.50], [69694814, 166, 40118, 360, 1, 2.50], [69644164, 166, 40118, 193, 1, 21.59]]' ) select('Table', 'cell:DATE,1(40118)') commonBits.doSleep() select('TabbedPane', 'Normal') click('Go') close() select('TabbedPane', '') select('Table', 'cell:Equivalent Record,0(-1)') select('Table', 'GeneratedCsvRecord', 'Equivalent Record,0') select('Table', 'cell:Equivalent Record,0(0)') select('Table1', 'cell:Equivalent Field,5()') select('Table', 'cell:Equivalent Record,0(0)') select('Table1', 'cell:Equivalent Field,5()') ##click('MetalInternalFrameTitlePane', 379, 15) ##click('MetalInternalFrameTitlePane', 345, 11) click('Right') select('TabbedPane', '') click('Compare') assert_p('TextPane', 'Text', 'Files are Identical !!!') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window('Record Editor'): select('FileChooser', commonBits.sampleDir() + 'Text_Test.txt') select('ComboBox2', 'Unknown Format') commonBits.doEdit(click) if window(''): select('Table', 'cell:J,1(P)') assert_p('Table', 'Content', '[[T, A, R, 5, 0, 1, 5, S, T, B, a, n, k, s, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , B, a, n, k, s, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , U, n, i, t, , 2, ,, , 3, 9, -, 4, 1, , A, l, l, i, n, g, h, a, m, , S, t, r, e, e, t, , , , , , , , , , , C, o, n, d, e, l, l, , P, a, r, k, , , , , , , , , , , , , , , , , , , , , , , , 2, 2, 0, 0, , , , , , , N, S, W, A], [T, A, R, 5, 0, 1, 9, S, T, P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 5, 8, , L, e, l, a, n, d, , S, t, r, e, e, t, , , , , , , , , , , , , , , , , , , , , , , , , P, e, n, r, i, t, h, , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 7, 5, 0, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 3, S, T, B, l, a, c, k, t, o, w, n, , , , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , D, o, c, k, , 2, ,, , 1, 1, , M, e, l, i, s, s, a, , P, l, a, c, e, , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 1, 4, 8, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 5, S, T, R, o, c, k, d, a, l, e, , , , , , , , , , , , , , , , , , , , , , , , , , , , B, u, i, l, d, i, n, g, , B, ,, , , P, o, r, t, s, i, d, e, , D, C, , , , , , , , , , , , , , , , , 2, -, 8, , M, c, , P, h, e, r, s, o, n, , S, t, r, e, e, t, , , , , , , , , , , , , , , , , , , , B, o, t, a, n, y, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 0, 1, 9, , , , , , , N, S, W, A], [T, A, R, 5, 0, 3, 7, S, T, M, i, r, a, n, d, a, , , , , , , , , , , , , , , , , , , , , , , , , , , , , W, e, s, t, f, i, e, l, d, , S, h, o, p, p, i, n, g, t, o, w, n, , , , , , , , , , , , , , , , , , , C, n, r, ., , U, r, u, n, g, a, , P, d, e, , &, , T, h, e, , K, i, n, g, s, w, a, y, , , , , , , , , , , M, i, r, a, n, d, a, , , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 2, 2, 8, , , , , , , N, S, W, A], [T, A, R, 5, 0, 5, 2, S, T, E, a, s, t, w, o, o, d, , , , , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , O, f, f, s, i, t, e, , R, e, s, e, r, v, e, , , , , , , , , , , , , , , , , 1, 1, , M, e, l, i, s, s, a, , P, l, a, c, e, , , , , , , , , , , , , , , , , , , , , , , , , M, a, r, a, y, o, n, g, , , , , , , , , , , , , , , , , , , , , , , , , , , , 2, 1, 4, 8, , , , , , , N, S, W, A]]') select('Table', 'cell:J,1(P)') ## assert_p('BmKeyedComboBox', 'Text', '9') assert_p('BmKeyedComboBox', 'Text', 'Text IO (byte Based)') commonBits.doSleep() click('Go') commonBits.doSleep() close() commonBits.doSleep() select('Table', 'cell:1 - 1|Data,1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)') assert_p('Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]') select('Table', 'cell:1 - 1|Data,1(TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA)') select('LayoutCombo', 'Full Line') select('Table', 'cell:Full Line,2(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') assert_p('Table', 'Content', '[[TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA], [TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA], [TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA], [TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA], [TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA], [TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA]]') select('Table', 'cell:Full Line,2(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') select('LayoutCombo', 'Hex 1 Line') select('Table', 'cell: + 1|Hex (1 Line),0([B@168442e)') assert_p('Table', 'Text', '54415235303135535442616e6b73746f776e202020202020202020202020202020202020202020202020202042616e6b73746f776e20202020202020202020202020202020202020202020202020202020202020556e697420322c2033392d343120416c6c696e6768616d2053747265657420202020202020202020436f6e64656c6c205061726b2020202020202020202020202020202020202020202020323230302020202020204e535741', ' + 1|Hex (1 Line),0') select('Table', 'cell: + 1|Hex (1 Line),1([B@18374c9)') assert_p('Table', 'Text', '54415235303139535450656e726974682020202020202020202020202020202020202020202020202020202050656e726974682020202020202020202020202020202020202020202020202020202020202020203538204c656c616e642053747265657420202020202020202020202020202020202020202020202050656e7269746820202020202020202020202020202020202020202020202020202020323735302020202020204e535741', ' + 1|Hex (1 Line),1') select('Table', 'cell: + 1|Hex (1 Line),2([B@c31c7d)') assert_p('Table', 'Text', '544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741', ' + 1|Hex (1 Line),2') select('Table', 'cell: + 1|Hex (1 Line),3([B@11de95a)') assert_p('Table', 'Text', '544152353033355354526f636b64616c652020202020202020202020202020202020202020202020202020204275696c64696e6720422c2020506f72747369646520444320202020202020202020202020202020322d38204d632050686572736f6e2053747265657420202020202020202020202020202020202020426f74616e792020202020202020202020202020202020202020202020202020202020323031392020202020204e535741', ' + 1|Hex (1 Line),3') select('Table', 'cell: + 1|Hex (1 Line),4([B@1c20de3)') assert_p('Table', 'Text', '5441523530333753544d6972616e646120202020202020202020202020202020202020202020202020202020576573746669656c642053686f7070696e67746f776e202020202020202020202020202020202020436e722e205572756e676120506465202620546865204b696e6773776179202020202020202020204d6972616e646120202020202020202020202020202020202020202020202020202020323232382020202020204e535741', ' + 1|Hex (1 Line),4') select('Table', 'cell: + 1|Hex (1 Line),5([B@3aab44)') assert_p('Table', 'Text', '54415235303532535445617374776f6f642020202020202020202020202020202020202020202020202020204d617261796f6e67204f6666736974652052657365727665202020202020202020202020202020203131204d656c6973736120506c6163652020202020202020202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741', ' + 1|Hex (1 Line),5') select('Table', 'cell: + 1|Hex (1 Line),5([B@3aab44)') select('LayoutCombo', 'Hex 2 Lines (Mainframe Style)') select('Table', 'cell: + 1|Hex (2 Lines),0([B@168442e)') assert_p('Table', 'Text', '''T A R 5 0 1 5 S T B a n k s t o w n B a n k s t o w n U n i t 2 , 3 9 - 4 1 A l l i n g h a m S t r e e t C o n d e l l P a r k 2 2 0 0 N S W A 54415235303135535442616e6b73746f776e202020202020202020202020202020202020202020202020202042616e6b73746f776e20202020202020202020202020202020202020202020202020202020202020556e697420322c2033392d343120416c6c696e6768616d2053747265657420202020202020202020436f6e64656c6c205061726b2020202020202020202020202020202020202020202020323230302020202020204e535741''', ' + 1|Hex (2 Lines),0') select('Table', 'cell: + 1|Hex (2 Lines),1([B@18374c9)') assert_p('Table', 'Text', '''T A R 5 0 1 9 S T P e n r i t h P e n r i t h 5 8 L e l a n d S t r e e t P e n r i t h 2 7 5 0 N S W A 54415235303139535450656e726974682020202020202020202020202020202020202020202020202020202050656e726974682020202020202020202020202020202020202020202020202020202020202020203538204c656c616e642053747265657420202020202020202020202020202020202020202020202050656e7269746820202020202020202020202020202020202020202020202020202020323735302020202020204e535741''', ' + 1|Hex (2 Lines),1') select('Table', 'cell: + 1|Hex (2 Lines),2([B@c31c7d)') assert_p('Table', 'Text', '''T A R 5 0 3 3 S T B l a c k t o w n M a r a y o n g D o c k 2 , 1 1 M e l i s s a P l a c e M a r a y o n g 2 1 4 8 N S W A 544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741''', ' + 1|Hex (2 Lines),2') select('Table', 'cell: + 1|Hex (2 Lines),3([B@11de95a)') assert_p('Table', 'Text', '''T A R 5 0 3 5 S T R o c k d a l e B u i l d i n g B , P o r t s i d e D C 2 - 8 M c P h e r s o n S t r e e t B o t a n y 2 0 1 9 N S W A 544152353033355354526f636b64616c652020202020202020202020202020202020202020202020202020204275696c64696e6720422c2020506f72747369646520444320202020202020202020202020202020322d38204d632050686572736f6e2053747265657420202020202020202020202020202020202020426f74616e792020202020202020202020202020202020202020202020202020202020323031392020202020204e535741''', ' + 1|Hex (2 Lines),3') select('Table', 'cell: + 1|Hex (2 Lines),4([B@1c20de3)') assert_p('Table', 'Text', '''T A R 5 0 3 7 S T M i r a n d a W e s t f i e l d S h o p p i n g t o w n C n r . U r u n g a P d e & T h e K i n g s w a y M i r a n d a 2 2 2 8 N S W A 5441523530333753544d6972616e646120202020202020202020202020202020202020202020202020202020576573746669656c642053686f7070696e67746f776e202020202020202020202020202020202020436e722e205572756e676120506465202620546865204b696e6773776179202020202020202020204d6972616e646120202020202020202020202020202020202020202020202020202020323232382020202020204e535741''', ' + 1|Hex (2 Lines),4') select('Table', 'cell: + 1|Hex (2 Lines),5([B@3aab44)') assert_p('Table', 'Text', '''T A R 5 0 5 2 S T E a s t w o o d M a r a y o n g O f f s i t e R e s e r v e 1 1 M e l i s s a P l a c e M a r a y o n g 2 1 4 8 N S W A 54415235303532535445617374776f6f642020202020202020202020202020202020202020202020202020204d617261796f6e67204f6666736974652052657365727665202020202020202020202020202020203131204d656c6973736120506c6163652020202020202020202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741''', ' + 1|Hex (2 Lines),5') select('Table', 'cell: + 1|Hex (2 Lines),5([B@3aab44)') select('LayoutCombo', 'Hex 3 Lines (ISPF Edit Hex)') select('Table', 'cell: + 1|Hex (SPF Edit Style),0([B@168442e)') assert_p('Table', 'Text', '''TAR5015STBankstown Bankstown Unit 2, 39-41 Allingham Street Condell Park 2200 NSWA 54533335546667767622222222222222222222222222466677676222222222222222222222222222222256672322332332466666666257766722222222224666666256762222222222222222222222233332222224554 41250153421eb34f7e0000000000000000000000000021eb34f7e00000000000000000000000000000005e9402c039d4101cc9e781d034255400000000003fe45cc0012b000000000000000000000002200000000e371''', ' + 1|Hex (SPF Edit Style),0') select('Table', 'cell: + 1|Hex (SPF Edit Style),1([B@18374c9)') assert_p('Table', 'Text', '''TAR5019STPenrith Penrith 58 Leland Street Penrith 2750 NSWA 54533335556676762222222222222222222222222222566767622222222222222222222222222222222233246666625776672222222222222222222222225667676222222222222222222222222222233332222224554 41250193405e2948000000000000000000000000000005e2948000000000000000000000000000000000580c5c1e4034255400000000000000000000000005e294800000000000000000000000000002750000000e371''', ' + 1|Hex (SPF Edit Style),1') select('Table', 'cell: + 1|Hex (SPF Edit Style),2([B@c31c7d)') assert_p('Table', 'Text', '''TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA 54533335546666767622222222222222222222222222467676662222222222222222222222222222222246662322332466677625666622222222222222224676766622222222222222222222222222233332222224554 4125033342c13b4f7e00000000000000000000000000d1219fe7000000000000000000000000000000004f3b02c0110d5c933100c1350000000000000000d1219fe70000000000000000000000000002148000000e371''', ' + 1|Hex (SPF Edit Style),2') select('Table', 'cell: + 1|Hex (SPF Edit Style),3([B@11de95a)') assert_p('Table', 'Text', '''TAR5035STRockdale Building B, Portside DC 2-8 Mc Pherson Street Botany 2019 NSWA 54533335556666666222222222222222222222222222476666662422256777666244222222222222222232324625667766257766722222222222222222224676672222222222222222222222222222233332222224554 4125035342f3b41c5000000000000000000000000000259c49e702c000f24394504300000000000000002d80d3008523fe034255400000000000000000002f41e9000000000000000000000000000002019000000e371''', ' + 1|Hex (SPF Edit Style),3') select('Table', 'cell: + 1|Hex (SPF Edit Style),4([B@1c20de3)') assert_p('Table', 'Text', '''TAR5037STMiranda Westfield Shoppingtown Cnr. Urunga Pde & The Kingsway Miranda 2228 NSWA 54533335546766662222222222222222222222222222567766666256677666767622222222222222222246722577666256622256624666776722222222224676666222222222222222222222222222233332222224554 412503734d921e4100000000000000000000000000007534695c4038f009e74f7e0000000000000000003e2e0525e7100450604850b9e737190000000000d921e4100000000000000000000000000002228000000e371''', ' + 1|Hex (SPF Edit Style),4') select('Table', 'cell: + 1|Hex (SPF Edit Style),5([B@3aab44)') assert_p('Table', 'Text', '''TAR5052STEastwood Marayong Offsite Reserve 11 Melissa Place Marayong 2148 NSWA 54533335546777666222222222222222222222222222467676662466767625676776222222222222222233246667762566662222222222222222222222224676766622222222222222222222222222233332222224554 41250523451347ff4000000000000000000000000000d1219fe70f663945025352650000000000000000110d5c933100c135000000000000000000000000d1219fe70000000000000000000000000002148000000e371''', ' + 1|Hex (SPF Edit Style),5') select('Table', 'cell: + 1|Hex (SPF Edit Style),2([B@c31c7d)') rightclick('Table', ' + 1|Hex (SPF Edit Style),2') select_menu('Edit Record') ## select('Table1', 'cell: + 1|Hex (SPF Edit Style),2([B@c31c7d)') select('Table', 'cell:Data,0(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') assert_p('Table', 'Content', '[[Data, 1, 1, TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA, T, 544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741]]') select('Table', 'cell:Data,0(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') assert_p('Table', 'Content', '[[Data, 1, 1, TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA, T, 544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741]]') select('Table', 'cell:Data,0(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') assert_p('Table', 'Text', 'cell:Data,0(TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSWA)') select('Table', 'cell:Hex,0(544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741)') assert_p('Table', 'Text', '544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741', 'Hex,0') select('Table', 'cell:Hex,0(544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741)') select('CheckBox', 'false') select('Table', 'cell:Hex,0([B@be568b)') assert_p('Table', 'Text', '''TAR5033STBlacktown Marayong Dock 2, 11 Melissa Place Marayong 2148 NSW 5453333554666676762222222222222222222222222246767666222222222222222222222222222222224666232233246667762566662222222222222222467676662222222222222222222222222223333222222455 4125033342c13b4f7e00000000000000000000000000d1219fe7000000000000000000000000000000004f3b02c0110d5c933100c1350000000000000000d1219fe70000000000000000000000000002148000000e37''', 'Hex,0') select('Table', 'cell:Hex,0([B@1aff6b1)') select('Table', 'cell:Hex,0([B@1589559)') commonBits.closeWindow(click) ##click('BasicInternalFrameTitlePane$NoFocusButton2') select('Table', 'cell: + 1|Hex (SPF Edit Style),2([B@c31c7d)') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_22' if window('Record Editor'): select('File_Txt', commonBits.sampleDir() + 'po/TipOfTheDay.properties') select('Record Layout_Txt', 'TipDetails') click(commonBits.fl('Edit') + '1') assert_p('TipList.FileDisplay_JTbl', 'Content', '''[[, <html>Do you have a <font color="blue"><b>File</b></font> with out a <b>File Description</b> (Record Layout) ??? <br/>You can use the <font color="blue"><b>File Wizard</b></font> to build the <b>File Description</b> from the data in the File. <br/>The <font color="blue"><b>File Wizard</b></font> has a Field-Search functionality to help identify the fields in the File. </html>], [, <html>Do you have a <font color="blue"><b>Cobol copybook</b></font> for a file ??? <br>You can use the <b>Record Layouts >>>> Load Cobol Copybook</b> function to load the Cobol Layout into the <b>RecordEditor</b> </html>], [, <html>Have you tried <font color="blue"><b>Filter</b></font> function ???. <br/>The <font color="blue">filter dialog</font> will display all records that match the entered criteria. You can specify multiple criteria (linked by <b>and / or</b> operators). <p>The <font color="blue">Filter function</font> can be a useful alternative to the find command</p </html>], [, <html>You can <font color="blue"><b>sort</b></font> a file by any of<ul> <li>Double clicking on the column heading</li> <li>Click on the sort Button, The editor will display display a <b>sort dialogue</b></li> <li>Using the <b>Right Click</b> menu. <li>Using the <b>Data >>>> Sort</b> Drop down menu </ul> </html>], [, <html>If you want to view a file in a different sequence without changing the order of records in the file, you can <ul> <li>Click <b>ctrl-a</b> to select all records, then select <b>View >>> Table View (Selected Record)</b> to create a new view. <li><b>Sort</b> this new view in to the required sequence; Only the view\'s record order will be updated, leaving the file in the original sequence. </ul> </html>], [, <html>Do you have <b>Multiple Record Types</b> in the file ???. You can use <b>View >>> Record Based Tree</b> to display the data in a Tree format. </html>], [, <html>Want to <b>Show / Hide</b> Columns ???. You can Use either the <b>Right Click >>> Show/Hide Column</b> Menu or the <b>Edit >>> Show / Hide</b> menu item. </html>], [, <html>Want to <b>Fix</b> a column so it does not scroll off the screen ???. Use the <b>Right Click >>> Fix Column</b> Menu Item. </html>], [, <html>Want to see a file <font color="blue"><b>View</b></font> in a seperate screen ??? <br/>You can use <ul> <li><b>Right Click >>> Undock tab</b> on the Tab Header <li><b>Window >>> Undock tab</b> command. </ul> </html>], [, <html>Want to <font color="blue"><b>compare files</b></font> ??? <br>The <b>Utilities >>> Compare Menu</b> does a <b>formated</b> file compare where fields can be excluded from the compare. </html>], [, <html>Want to convert a <b>file</b> to a different <b>format</b> ???, check out <ul> <li>The <b>Export</b> functions (CSV, Fixed, Xml etc) see <b>File >>> Export</b> . <li><b>Velocity</b> Export Functions. Velocity Templates can be used to create a custom export format <li><b>Copy</b> Functions (<b>Utilities >>> File Copy Menu</b> </ul> </html>], [, <html>Have you tried <font color="blue"><b>Sort Tree\'s</b></font> (<b>View >>> Sort Field Tree</b>) yet ??? <br/><font color="blue"><b>Sort Tree\'s</b></font> will do a Sort sum [<i>like a <b>SQL</b> Select sum(...), ave(..)... Group by ...</i>] on the file and display the result as a Tree where you can drill down to the individual records. </html>], [, <html>Do you edit <font color="blue"><b>GetText-PO</b></font> files, You can edit them in the <b>RecordEditor</b> with the <font color="blue">GetText_PO</font> <b>RecordLayout</b>.], [, <html>Do you edit <font color="blue"><b>SwingX Tip Of The Day</b></font> properties files, You can edit them in the <b>RecordEditor</b> with the <font color="blue">Tip_of_The_Days_Properties</font> <b>RecordLayout</b>.], [, <html>Have you tried the <b>Docking / Undocking</b> (on the <b>Window</b> Menu and <b>Right Click</b> menus) yet ??? </html>], [, <html>Have you tried <b>Right Clicking</b> on a panel back ground ???, there are <b>docking / undocking</b> options </html>], [, <html>Are you using the same <b>Filter, Sort, Sort Tree</b> or <b>RecordTree</b> all the time ???. You can use the save / load options to save / load the definition to/from xml files. You can also execute them from the <b>View</b> menu. </html>], [, <html>Edit <b>Csv</b> files with the RecordEditor ???, you can use the <b>Edit > > > Update Csv Column</b> to move, copy, insert, delete and rename columns !!!. </html>], [, <html>Edit <b>Csv</b> files ???, you use the <b>Right Click >>> CSV Options</b> to Add, delete, copy, move columns !!! </html>], [, <html>Want to see what changes you have made to the file since the last save ??? <br/>Try the <b>Utilities >>> Compare with Disk</b>. </html>], [, <html>Use Cobol, You can use the <b>Utilities >>>> Cobol Copybook Analysis</b> to see the structure / field starting poiint of the <b>Cobol Copbook.</b> </html>], [, <html>Use Cobol, You can use the <b>Utilities >>>> Cobol Copybook Analysis</b> to see the structure / field starting poiint of the <b>Cobol Copbook.</b> </html>]]''') select('Table', 'cell:' + commonBits.fl('Line') + ',1(2)') assert_p('EditorPane', 'Text', '''<html>Do you have a <font color="blue"><b>Cobol copybook</b></font> for a file ??? <br>You can use the <b>Record Layouts >>>> Load Cobol Copybook</b> function to load the Cobol Layout into the <b>RecordEditor</b> </html>''') commonBits.doSleep() assert_p('EditorPane1', 'Text', '<html>\n <head>\n \n </head>\n <body>\n Do you have a <font color="blue"><b>Cobol copybook</b></font> for a file \n ???<br>You can use the <b>Record Layouts >>>> Load Cobol Copybook</b> \n function to load the Cobol Layout into the <b>RecordEditor</b>\n </body>\n</html>\n') ## assert_p('EditorPane1', 'Text', '<html>\n <head>\n \n </head>\n <body>\n Do you have a <b><font color="blue">Cobol copybook</font></b> for a file \n ???<br>You can use the <b>Record Layouts >>>> Load Cobol Copybook</b> \n function to load the Cobol Layout into the <b>RecordEditor</b>\n </body>\n</html>\n') commonBits.doSleep() assert_p('EditorPane1', 'Text', '''<html> <head> </head> <body> Do you have a <font color="blue"><b>Cobol copybook</b></font> for a file ???<br>You can use the <b>Record Layouts >>>> Load Cobol Copybook</b> function to load the Cobol Layout into the <b>RecordEditor</b> </body> </html> ''') select('Table', 'cell:' + commonBits.fl('Line') + ',2(3)') commonBits.doSleep() assert_p('EditorPane', 'Text', '''<html>Have you tried <font color="blue"><b>Filter</b></font> function ???. <br/>The <font color="blue">filter dialog</font> will display all records that match the entered criteria. You can specify multiple criteria (linked by <b>and / or</b> operators). <p>The <font color="blue">Filter function</font> can be a useful alternative to the find command</p </html>''') assert_p('EditorPane1', 'Text', '''<html> <head> </head> <body> Have you tried <font color="blue"><b>Filter</b></font> function ???.<br>The <font color="blue">filter dialog</font> will display all records that match the entered criteria. You can specify multiple criteria (linked by <b>and / or</b> operators). <p> The <font color="blue">Filter function</font> can be a useful alternative to the find command </p> </body> </html> ''') select('Table', 'cell:' + commonBits.fl('Line') + ',3(4)') commonBits.doSleep() assert_p('EditorPane', 'Text', '''<html>You can <font color="blue"><b>sort</b></font> a file by any of<ul> <li>Double clicking on the column heading</li> <li>Click on the sort Button, The editor will display display a <b>sort dialogue</b></li> <li>Using the <b>Right Click</b> menu. <li>Using the <b>Data >>>> Sort</b> Drop down menu </ul> </html>''') assert_p('EditorPane1', 'Text', '''<html> <head> </head> <body> You can <font color="blue"><b>sort</b></font> a file by any of <ul> <li> Double clicking on the column heading </li> <li> Click on the sort Button, The editor will display display a <b>sort dialogue</b> </li> <li> Using the <b>Right Click</b> menu. </li> <li> Using the <b>Data >>>> Sort</b> Drop down menu </li> </ul> </body> </html> ''') select('Table', 'cell:' + commonBits.fl('Line') + ',4(5)') commonBits.doSleep() assert_p('EditorPane', 'Text', '''<html>If you want to view a file in a different sequence without changing the order of records in the file, you can <ul> <li>Click <b>ctrl-a</b> to select all records, then select <b>View >>> Table View (Selected Record)</b> to create a new view. <li><b>Sort</b> this new view in to the required sequence; Only the view\'s record order will be updated, leaving the file in the original sequence. </ul> </html>''') assert_p('EditorPane1', 'Text', '''<html> <head> </head> <body> If you want to view a file in a different sequence without changing the order of records in the file, you can <ul> <li> Click <b>ctrl-a</b> to select all records, then select <b>View >>> Table View (Selected Record)</b> to create a new view. </li> <li> <b>Sort</b> this new view in to the required sequence; Only the view\'s record order will be updated, leaving the file in the original sequence. </li> </ul> </body> </html> ''') select('Table', 'cell:' + commonBits.fl('Line') + ',4(5)') rightclick('Table', commonBits.fl('Line') + ',5') ## select('Table', 'cell:' + commonBits.fl('Line') + ',4(5)') select_menu(commonBits.fl('Edit Record')) select('TabbedPane', 'Single Tip Record') assert_p('EditorPane2', 'Text', '''<html>Do you have <b>Multiple Record Types</b> in the file ???. You can use <b>View >>> Record Based Tree</b> to display the data in a Tree format. </html>''') assert_p('EditorPane3', 'Text', '''<html> <head> </head> <body> Do you have <b>Multiple Record Types</b> in the file ???. You can use <b>View >>> Record Based Tree</b> to display the data in a Tree format. </body> </html> ''') click('Right') assert_p('EditorPane2', 'Text', '''<html>Want to <b>Show / Hide</b> Columns ???. You can Use either the <b>Right Click >>> Show/Hide Column</b> Menu or the <b>Edit >>> Show / Hide</b> menu item. </html>''') assert_p('EditorPane3', 'Text', '''<html> <head> </head> <body> Want to <b>Show / Hide</b> Columns ???. You can Use either the <b>Right Click >>> Show/Hide Column</b> Menu or the <b>Edit >>> Show / Hide</b> menu item. </body> </html> ''') click('Right') assert_p('EditorPane2', 'Text', '''<html>Want to <b>Fix</b> a column so it does not scroll off the screen ???. Use the <b>Right Click >>> Fix Column</b> Menu Item. </html>''') assert_p('EditorPane3', 'Text', '''<html> <head> </head> <body> Want to <b>Fix</b> a column so it does not scroll off the screen ???. Use the <b>Right Click >>> Fix Column</b> Menu Item. </body> </html> ''') click(commonBits.fl('Single Tip Record')) click(commonBits.fl('Tip List')) select('TabbedPane', 'Tip List') select('Table', 'cell:' + commonBits.fl('Line') + ',4(5)') click(commonBits.fl('Single Tip Record')) select('TabbedPane', 'Single Tip Record') close()
def test(): from Modules import commonBits java_recorded_version = '1.6.0_17' if window(commonBits.applicationName()): select('FileNameTxtFld', commonBits.sampleDir() + 'protoStoreSales6.bin') click('Edit1') ##select('JTreeTable', '') rightclick('JTreeTable', 'Tree,0') select_menu('Fully Expand Tree') select('LayoutCombo', 'Product') assert_p( 'JTreeTable', 'Content', '[[, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, SALE, DEBIT_CARD], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ], [, , , , , , , ]]' ) select('LayoutCombo', 'Prefered') assert_p( 'JTreeTable', 'Content', '[[, , 20, Store: 20, , , , ], [, , , , , , , ], [, , 170, Department: 170, , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , 1, 4870, 1, , , ], [, , 280, Department: 280, , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, SALE, DEBIT_CARD], [, , 69694158, 40118, 1, 19000, SALE, ], [, , 69694158, 40118, -1, -19000, RETURN, CASH], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , 2, 10020, 6, , , ], [, , 685, Department: 685, , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , 0, 0, 2, , , ], [, , 929, Department: 929, , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , 1, 3590, 1, , , ], [, , 957, Department: 957, , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , 12, 7580, 3, , , ], [, , , , , , , ], [, , 63604808, 1, , , , ], [, , 69684558, 1, , , , ], [, , 69694158, 1, , , , ], [, , 65674532, 1, , , , ], [, , 63674861, 10, , , , ], [, , 64634429, 1, , , , ], [, , 66624458, 1, , , , ], [, , 16, 26060, 13, , , ], [, , 59, Store: 59, , , , ], [, , 166, Store: 166, , , , ], [, , 184, Store: 184, , , , ]]' ) select('JTreeTable', 'rows:[7,8,9,10,11,12,13],columns:[Tree,keycode]') select_menu('View>>Table View #{Selected Records#}') ## select('JTreeTable', 'rows:[8,9,10,11,12,13],columns:[Tree,keycode]') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, SALE, DEBIT_CARD], [69694158, 40118, 1, 19000, SALE, ], [69694158, 40118, -1, -19000, RETURN, CASH], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) select('LinesTbl', 'OTHER', '5|saleType,2') select('LinesTbl', 'cell:2|saleDate,2(40118)') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, OTHER, DEBIT_CARD], [69694158, 40118, 1, 19000, SALE, ], [69694158, 40118, -1, -19000, RETURN, CASH], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) select('LinesTbl', '', '6|paymentType,2') select('LinesTbl', 'cell:2|saleDate,2(40118)') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, OTHER, ], [69694158, 40118, 1, 19000, SALE, ], [69694158, 40118, -1, -19000, RETURN, CASH], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) select('LinesTbl', 'RETURN', '5|saleType,3') select('LinesTbl', 'cell:2|saleDate,3(40118)') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, OTHER, ], [69694158, 40118, 1, 19000, RETURN, ], [69694158, 40118, -1, -19000, RETURN, CASH], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) select('LinesTbl', 'CHEQUE', '6|paymentType,3') select('LinesTbl', 'cell:2|saleDate,3(40118)') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, OTHER, ], [69694158, 40118, 1, 19000, RETURN, CHEQUE], [69694158, 40118, -1, -19000, RETURN, CASH], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) select('LinesTbl', 'SALE', '5|saleType,4') select('LinesTbl', 'cell:3|quantity,4(-1)') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, OTHER, ], [69694158, 40118, 1, 19000, RETURN, CHEQUE], [69694158, 40118, -1, -19000, SALE, CASH], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) commonBits.doSleep() select('LinesTbl', '', '6|paymentType,4') select('LinesTbl', 'cell:3|quantity,4(-1)') assert_p( 'LinesTbl', 'Content', '[[69684558, 40118, 1, 19000, SALE, CHEQUE], [69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [69684558, 40118, 1, 5010, OTHER, ], [69694158, 40118, 1, 19000, RETURN, CHEQUE], [69694158, 40118, -1, -19000, SALE, ], [69694158, 40118, 1, 5010, SALE, CHEQUE]]' ) click('BasicInternalFrameTitlePane$NoFocusButton2') select('JTreeTable', 'rows:[8,9,10,11,12,13],columns:[Tree,keycode]') select('JTreeTable', 'rows:[8,9,10,11,12,13],columns:[Tree,keycode]') select_menu('Window>>protoStoreSales6.bin>>Tree View') select('JTreeTable', 'rows:[8,9,10,11,12,13],columns:[Tree,keycode]') assert_p( 'JTreeTable', 'Content', '[[, , 20, Store: 20, , , , ], [, , , , , , , ], [, , 170, Department: 170, , , , ], [, , , , , , , ], [, , 63604808, 40118, 1, 4870, SALE, CASH], [, , 1, 4870, 1, , , ], [, , 280, Department: 280, , , , ], [, , , , , , , ], [, , 69684558, 40118, 1, 19000, SALE, CHEQUE], [, , 69684558, 40118, -1, -19000, RETURN, CREDIT_CARD], [, , 69684558, 40118, 1, 5010, OTHER, ], [, , 69694158, 40118, 1, 19000, RETURN, CHEQUE], [, , 69694158, 40118, -1, -19000, SALE, ], [, , 69694158, 40118, 1, 5010, SALE, CHEQUE], [, , 2, 10020, 6, , , ], [, , 685, Department: 685, , , , ], [, , , , , , , ], [, , 62684671, 40118, 1, 69990, SALE, CREDIT_CARD], [, , 62684671, 40118, -1, -69990, RETURN, DEBIT_CARD], [, , 0, 0, 2, , , ], [, , 929, Department: 929, , , , ], [, , , , , , , ], [, , 65674532, 40118, 1, 3590, SALE, ], [, , 1, 3590, 1, , , ], [, , 957, Department: 957, , , , ], [, , , , , , , ], [, , 63674861, 40118, 10, 2700, SALE, CASH], [, , 64634429, 40118, 1, 3990, SALE, CHEQUE], [, , 66624458, 40118, 1, 890, SALE, CREDIT_CARD], [, , 12, 7580, 3, , , ], [, , , , , , , ], [, , 63604808, 1, , , , ], [, , 69684558, 1, , , , ], [, , 69694158, 1, , , , ], [, , 65674532, 1, , , , ], [, , 63674861, 10, , , , ], [, , 64634429, 1, , , , ], [, , 66624458, 1, , , , ], [, , 16, 26060, 13, , , ], [, , 59, Store: 59, , , , ], [, , 166, Store: 166, , , , ], [, , 184, Store: 184, , , , ]]' ) select_menu('Utilities>>Compare with Disk') assert_p( 'Table', 'Content', '[[, Old, 8, 69684558, 40118, 1, 5010, SALE, DEBIT_CARD], [, New, 8, , , , , OTHER, ], [, Old, 9, 69694158, 40118, 1, 19000, SALE, ], [, New, 9, , , , , RETURN, CHEQUE], [, Old, 10, 69694158, 40118, -1, -19000, RETURN, CASH], [, New, 10, , , , , SALE, ]]' ) click('BasicInternalFrameTitlePane$NoFocusButton2') click('BasicInternalFrameTitlePane$NoFocusButton2') if window('Save Changes to file: ' + commonBits.sampleDir() + 'protoStoreSales6.bin'): click('No') close() close()