Exemplo n.º 1
0
def test():

    set_java_recorded_version("1.6.0_22")
    if window('Record Editor'):
        select_menu('Record Layouts>>Load Copybook')

        if frame(
                ' - Load Record Layout using selectedLoaderRecord Edit - hsqldb:0'
        ):
            select('User Selected Copybook',
                   commonBits.xmlCopybookDir() + 'wwFile.Xml')
            select('System', 'Other')
            click('Go')
            assert_p(
                'JTextArea_40', 'Text', '-->> ' + commonBits.xmlCopybookDir() +
                'wwFile.Xml processed\n      Copybook: wwFile')
            click('Close')
        close()

        select_menu('Record Layouts>>Edit Layout')

        if frame('Edit Record Layout - DB  - Record Edit - hsqldb:1'):
            select('Record Name', 'wwF%')
            select('Description', '%%')
            assert_content('JTable_23', [['wwFile', 'ww File Def']])

        close()

    close()

    pass
Exemplo n.º 2
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_22'

    if window('Record Layout Definitions'):
        select_menu('Record Layouts>>Load Copybook')
        select('User Selected Copybook_Txt',
               commonBits.cobolDir() + 'AmsLocation.cbl')
        select('Binary Format_Txt', 'Mainframe')
        assert_p('Copybook Type_Txt', 'Text', 'Cobol Copybook (DB)')
        select(
            'User Selected Copybook_Txt',
            commonBits.paramDir() + 'CopyBook' + commonBits.fileSep() +
            'cb2xml' + commonBits.fileSep() + 'AMSLOCATION.xml')
        select('System_Txt', 'CSV')
        assert_p('Copybook Type_Txt', 'Text', 'cb2xml XML Copybook (DB)')
        select(
            'User Selected Copybook_Txt',
            commonBits.paramDir() + 'CopyBook' + commonBits.fileSep() + 'Csv' +
            commonBits.fileSep() + 'ams PO Download.Txt')

        select('Binary Format_Txt', 'Intel')
        assert_p('Copybook Type_Txt', 'Text',
                 'RecordEditor Tab Copybook (Tab Seperator)')
        select('User Selected Copybook_Txt',
               commonBits.xmlCopybookDir() + 'ams PO Download.Xml')
        select('System_Txt', 'Ams')
        assert_p('Copybook Type_Txt', 'Text', 'RecordEditor XML Copybook')
##		select('Binary Format_Txt', 'Mainframe')
##		select('System_Txt', 'CSV')
##		select('Binary Format_Txt', 'Intel')
##		select('System_Txt', 'Ams')
    close()
Exemplo n.º 3
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_22'

	if window('Record Editor'):
		select_menu(commonBits.fl('Record Layouts') + '>>' + commonBits.fl('Load Copybook')
)
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx1File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx2File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx2File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx3File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx3File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx4File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx4File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx5File.Xml')
		click(commonBits.fl('Go'))
		select('User Selected Copybook_Txt', commonBits.xmlCopybookDir() + 'wx5File.Xml')
		click(commonBits.fl('Go'))
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select_menu(commonBits.fl('Record Layouts') + '>>' + commonBits.fl('Edit Layout'))
		select('RecordList.Record Name_Txt', 'wx4File')
		select('RecordList.Description_Txt', '%%')
		assert_p('ChildRecordsJTbl', 'Content', '[[, wwProd01, , , , , ], [, wwProd02, , , , , wwProdHead], [, wwProd05, , , , , wwProdHead], [, wwTrailer, , , , , wwHeader], [, wwProdHead, , , , , wwHeader], [, wwHeader, , , , , ], [, wwProd07, , , , , ]]')
		select('RecordList.Record Name_Txt', 'wx3File')
		select('RecordList.Description_Txt', '%')
		assert_p('ChildRecordsJTbl', 'Content', '[[, wwProd01, , RecordType1, P, , ], [, wwProd02, , , , , wwProdHead], [, wwProd05, , , , , wwProdHead], [, wwTrailer, , , , , wwHeader], [, wwProdHead, , , , , wwHeader], [, wwHeader, , , , , ], [, wwProd07, , , , , ]]')
		select('RecordList.Record Name_Txt', 'wx2File')

		select('RecordList.Description_Txt', '%%')

		assert_p('ChildRecordsJTbl', 'Content', '[[, wwProd01, , , , , ], [, wwProd02, , , , , wwProdHead], [, wwProd05, , , , , wwProdHead], [, wwTrailer, , , , , wwHeader], [, wwProdHead, , , , , wwHeader], [, wwHeader, , , , , ], [, wwProd07, , , , , ]]')
##		select('ChildRecordsJTbl', '')
		rightclick('ChildRecordsJTbl', commonBits.fl('Field') + ',2')
		select_menu(commonBits.fl('View Record Selections Tree')
)
		assert_p('JTreeTable', 'Content', '[[, ,   ,   ,   , , =, ], [, , ' + commonBits.fl('And') + '  ,   ,   , RecordType1, =, P], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, 01], [, ,   , ' + commonBits.fl('Or') + '  ,   , RecordType1, =, P], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, 02], [, ,   , ' + commonBits.fl('Or') + '  ,   , RecordType1, =, P], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, 05], [, ,   ,   ,   , , =, ], [, ,   ,   ,   , , =, ], [, ,   ,   ,   , , =, ], [, , ' + commonBits.fl('And') + '  ,   ,   , RecordType1, =, T], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, TR], [, ,   ,   ,   , , =, ], [, , ' + commonBits.fl('And') + '  ,   ,   , RecordType1, =, P], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, HD], [, ,   ,   ,   , , =, ], [, , ' + commonBits.fl('And') + '  ,   ,   , RecordType1, =, H], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, HD], [, ,   ,   ,   , , =, ], [, , ' + commonBits.fl('And') + '  ,   ,   , RecordType1, =, P], [, ,   ,   , ' + commonBits.fl('And') + '  , RecordType2, =, 07]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
	close()
Exemplo n.º 4
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_10'

    if window('Record Editor'):
        select_menu('Record Layouts>>Load Copybook')
        select('FileChooser',
               commonBits.xmlCopybookDir() + 'yyAms PO Download.Xml')
        select('BmKeyedComboBox1', 'Other')
        click('Go')
        rightclick('TextArea')
        assert_p(
            'TextArea', 'Text', '''

-->> ''' + commonBits.xmlCopybookDir() + '''yyAms PO Download.Xml processed

      Copybook: yyAms PO Download''')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('Reload from DB')
        select('FileChooser',
               commonBits.sampleDir() + 'zzAms_PODownload_20041231.txt')
        select('ComboBox1', 'Other')
        select_menu('Record Layouts>>Edit Layout')
        select('TextField', 'yy%')
        select('TextField1', '%')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Child Records')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        ##		click('ScrollPane$ScrollBar', 12, 112)
        click('Reload from DB')
        ##		select('ComboBox2', 'yyAms PO Download')
        commonBits.setRecordLayout(select, 'yyAms PO Download')

        commonBits.doEdit(click)
        select('Table', 'cell:3 - 4|DC Number 1,0(4534)')
        rightclick('Table', '1 - 2|Record Type,0')
        ##		select('Table', 'cell:3 - 4|DC Number 1,0(4534)')
        select_menu('Edit Record')
        ##		select('Table1', 'cell:3 - 4|DC Number 1,0(4534)')
        select('Table', 'cell:Data,3(286225)')
        click('Right')
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, D1, D1], [Pack Qty, 3, 9, 7.0000, 000070000], [Pack Cost, 12, 13, 0.0002, 0000000000002], [APN, 25, 13, 2222500000000, 2222500000000], [Filler, 38, 1, , ], [Product, 39, 8, 43314531, 43314531], [pmg dtl tech key, 72, 15, 2075359, 2075359], [Case Pack id, 87, 15, 45614531, 45614531], [Product Name, 101, 50,  DONKEY 24-006607 SHWL WRAP CARD,  DONKEY 24-006607 SHWL WRAP CARD]]'
        )
        click('TextArea')
        assert_p(
            'TextArea', 'Text',
            'D100007000000000000000022222500000000 43314531000000054540000007       2075359        45614531       DONKEY 24-006607 SHWL WRAP CARD                   '
        )
        click('Left')
        select('Table', 'cell:Data,4(040909)')
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, H1, H1], [Sequence Number, 3, 5, 45.349, 45349], [Vendor, 8, 10, 6060, 0000006060], [PO, 18, 12, 286225, 286225], [Entry Date, 30, 6, 040909, 040909], [Filler, 36, 8, , ], [beg01 code, 44, 2, 00, 00], [beg02 code, 46, 2, , ], [Department, 48, 4, 200, 200], [Expected Reciept Date, 52, 6, 050102, 050102], [Cancel by date, 58, 6, 050107, 050107], [EDI Type, 68, 1, , ], [Add Date, 69, 6, , ], [Filler, 75, 1, , ], [Department Name, 76, 10, LADIES KNI, LADIES KNI], [Prcoess Type, 86, 1, C, C], [Order Type, 87, 2, FT, FT]]'
        )
        select('Table', 'cell:Data,4(040909)')
        click('TextArea')
        assert_p(
            'TextArea', 'Text',
            'H1453490000006060286225      040909        00  200 0501020501075965        LADIES KNICFT'
        )
        doubleclick('Right')
        doubleclick('Right')
        select('Table', 'cell:Data,9(5151)')
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, S1, S1], [DC Number 1, 3, 4, 5043, 5043], [Pack Quantity 1, 7, 8, 1, 00000001], [DC Number 2, 15, 4, 5045, 5045], [Pack Quantity 2, 19, 8, 1, 00000001], [DC Number 4, 39, 4, 5076, 5076], [Pack Quantity 4, 43, 8, 1, 00000001], [DC Number 5, 51, 4, 5079, 5079], [Pack Quantity 5, 55, 8, 1, 00000001], [DC Number 6, 63, 4, 5151, 5151], [Pack Quantity 6, 67, 8, 1, 00000001], [DC Number 7, 75, 4, 5072, 5072], [Pack Quantity 7, 79, 8, 1, 00000001], [DC Number 8, 87, 4, , ], [Pack Quantity 8, 91, 8, 0, 00000000], [DC Number 9, 99, 4, , ], [Pack Quantity 9, 103, 8, 0, 00000000], [DC Number 10, 111, 4, , ], [Pack Quantity 10, 115, 8, 0, 00000000]]'
        )

        select_menu('Record Layouts>>Edit Layout')
        select('TextField', 'yy%')
        select('TextField1', '%')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Child Records')
        select('Table', 'cell:Description,0()')
        # 		click('Delete3')
        select('TextField', 'yyAms PO Download')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Child Records')
        click('Delete3')

        if window('Delete: yyAms PO Download'):
            click('Yes')
        close()

        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download%')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download: A%')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        click('Delete3')

        if window('Delete: yyAms PO Download: Allocation'):
            click('Yes')
        close()

        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download: H%')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        click('Delete3')

        if window('Delete: yyAms PO Download: Header'):
            click('Yes')
        close()

        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download: %')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Extras')
        select('TabbedPane', 'Fields')
        click('Delete3')

        if window('Delete: yyAms PO Download: Detail'):
            click('Yes')
        close()
    close()
Exemplo n.º 5
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_17'

    if window('Record Editor'):
        select_menu('Record Layouts>>Load Copybook')
        select('FileChooser',
               commonBits.xmlCopybookDir() + 'zFixedWidth_ams_Store.Xml')
        click('Go')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('Open')
        select('FileChooser',
               commonBits.sampleDir() + 'FixedWidth_Ams_Store.txt')
        click('Reload from DB')
        select('ComboBox2', 'zFixedWidth_ams_Store')
        commonBits.doEdit(click)
        select(
            'Table',
            'rows:[3,4,5,6,7,8,9,10,11],columns:[1 - 3|Brand Id,4 - 4|Loc Nbr]'
        )
        select_menu('View>>Table View #{Selected Records#}')
        ##		select('Table2', 'rows:[4,5,6,7,8,9,10,11],columns:[1 - 3|Brand Id,4 - 4|Loc Nbr]')
        select('Table', 'cell:10 - 35|Loc Name,3(Rockdale)')
        assert_p(
            'Table', 'Content',
            '[[TAR, 5015, ST, Bankstown, Bankstown, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [TAR, 5019, ST, Penrith, Penrith, 58 Leland Street, Penrith, 2750, NSW, A], [TAR, 5033, ST, Blacktown, Marayong, Dock 2, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A]]'
        )
        select('Table', 'cell:10 - 35|Loc Name,3(Rockdale)')
        select('LayoutCombo', 'Full Line')
        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], [TAR5055STLeichhardt                         Marketown                               Marion Street                           Leichhardt                         2040      NSWA], [TAR5060STSt Marys                           St. Mary\'s                              Charles Hackett Drive                   St Mary\'s                          2760      NSWA]]'
        )
        select('LayoutCombo', 'Hex 1 Line')
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),0([B@1145e2e)'
        )
        ##		assert_p('Table', 'Text', 'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),0([B@1145e2e)')
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),1([B@e0de15)'
        )
        assert_p(
            'Table', 'Text',
            '544152353033335354426c61636b746f776e20202020202020202020202020202020202020202020202020204d617261796f6e672020202020202020202020202020202020202020202020202020202020202020446f636b20322c203131204d656c6973736120506c616365202020202020202020202020202020204d617261796f6e67202020202020202020202020202020202020202020202020202020323134382020202020204e535741',
            '         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),2'
        )
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),2([B@11addf0)'
        )
        assert_p(
            'Table', 'Text',
            '544152353033355354526f636b64616c652020202020202020202020202020202020202020202020202020204275696c64696e6720422c2020506f72747369646520444320202020202020202020202020202020322d38204d632050686572736f6e2053747265657420202020202020202020202020202020202020426f74616e792020202020202020202020202020202020202020202020202020202020323031392020202020204e535741',
            '         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),3'
        )
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),2([B@11addf0)'
        )
        ##		assert_p('Table', 'Text', 'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),2([B@11addf0)')
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (1 Line),2([B@11addf0)'
        )
        select('LayoutCombo', '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 
54415235303135535442616e6b73746f776e202020202020202020202020202020202020202020202020202042616e6b73746f776e20202020202020202020202020202020202020202020202020202020202020556e697420322c2033392d343120416c6c696e6768616d2053747265657420202020202020202020436f6e64656c6c205061726b2020202020202020202020202020202020202020202020323230302020202020204e535741''',
            '         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),0'
        )

        ###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
        ###54415235303135535442616e6b73746f776e202020202020202020202020202020202020202020202020202042616e6b73746f776e20202020202020202020202020202020202020202020202020202020202020556e697420322c2033392d343120416c6c696e6768616d2053747265657420202020202020202020436f6e64656c6c205061726b2020202020202020202020202020202020202020202020323230302020202020204e535741''', '         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),0')
        assert_p('Table', 'Text', '')
        assert_p('Table', 'Text', '')
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),3([B@12e84f4)'
        )
        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         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),3'
        )

        ###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
        ###544152353033355354526f636b64616c652020202020202020202020202020202020202020202020202020204275696c64696e6720422c2020506f72747369646520444320202020202020202020202020202020322d38204d632050686572736f6e2053747265657420202020202020202020202020202020202020426f74616e792020202020202020202020202020202020202020202020202020202020323031392020202020204e535741''', '         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),3')
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),4([B@3b1633)'
        )
        ##		assert_p('Table', 'Text', 'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),4([B@3b1633)')
        select(
            'Table',
            'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),5([B@843edc)'
        )
        ##		assert_p('Table', 'Text', 'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),5([B@843edc)')
        ##		select('Table', 'cell:         +         1         +         2         +         3         +         4         +         5         +         6         +         7         +         8         +         9         +        10         +        11         +        12         +        13         +        14         +        15         +        16         +        17         +        18|Hex (2 Lines),5([B@843edc)')
        select('LayoutCombo', 'Hex 3 Lines (ISPF Edit Hex)')
        select(
            'Table',
            'cell:    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),3([B@12e84f4)'
        )
        assert_p(
            'Table', 'Text',
            '''TAR5035STRockdale                           Building B,  Portside DC                2-8 Mc Pherson Street                   Botany                             2019      NSWA
54533335556666666222222222222222222222222222476666662422256777666244222222222222222232324625667766257766722222222222222222224676672222222222222222222222222222233332222224554
4125035342f3b41c5000000000000000000000000000259c49e702c000f24394504300000000000000002d80d3008523fe034255400000000000000000002f41e9000000000000000000000000000002019000000e371''',
            '    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),3'
        )
        select(
            'Table',
            'cell:    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),4([B@3b1633)'
        )
        ##		assert_p('Table', 'Text', 'cell:    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),4([B@3b1633)')
        select(
            'Table',
            'cell:    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),5([B@843edc)'
        )
        assert_p(
            'Table', 'Text',
            '''TAR5052STEastwood                           Marayong Offsite Reserve                11 Melissa Place                        Marayong                           2148      NSWA
54533335546777666222222222222222222222222222467676662466767625676776222222222222222233246667762566662222222222222222222222224676766622222222222222222222222222233332222224554
41250523451347ff4000000000000000000000000000d1219fe70f663945025352650000000000000000110d5c933100c135000000000000000000000000d1219fe70000000000000000000000000002148000000e371''',
            '    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),5'
        )
        select(
            'Table',
            'cell:    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),3([B@12e84f4)'
        )
        select(
            'Table',
            'cell:    +    1    +    2    +    3    +    4    +    5    +    6    +    7    +    8    +    9    +   10    +   11    +   12    +   13    +   14    +   15    +   16    +   17    +   18|Hex (SPF Edit Style),3([B@12e84f4)'
        )
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Exemplo n.º 6
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_10'

    if window('Record Layout Definitions'):
        click('*7')
        select('FileChooser',
               commonBits.xmlCopybookDir() + 'yyAms PO Download.Xml')
        #select('BmKeyedComboBox1', '9')
        select('BmKeyedComboBox1', 'Other')

        click(commonBits.fl('Go'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.xmlCopybookDir() + 'yyAms PO Download.Xml',
                'yyAms PO Download'))

        ##		assert_p('TextArea', 'Text', '''
        ##
        ##-->> ''' + commonBits.xmlCopybookDir() + '''yyAms PO Download.Xml processed
        ##
        ##      Copybook: yyAms PO Download''')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('*')
        select('TextField', 'yy%')
        select('TextField1', '%')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Child Records')
        assert_p('TextField2', 'Text', 'yyAms PO Download')
        assert_p('BmKeyedComboBox2', 'Text', commonBits.fl('Group of Records'))
        select('ChildRecordsJTbl',
               'cell:' + commonBits.fl('Child Record') + ',0(416)')
        assert_p('ChildRecordsJTbl', 'Text', 'yyAms PO Download: Detail',
                 '' + commonBits.fl('Child Record') + ',0')
        #		select('ChildRecordsJTbl', '416', commonBits.fl('Child Record') + ',0')
        #		select('ChildRecordsJTbl', 'cell:' + commonBits.fl('Child Record') + ',1(417)')
        #		select('ChildRecordsJTbl', 'cell:' + commonBits.fl('Child Record') + ',1(417)')
        assert_p('ChildRecordsJTbl', 'Text', 'yyAms PO Download: Header',
                 '' + commonBits.fl('Child Record') + ',1')
        #		select('ChildRecordsJTbl', '417', commonBits.fl('Child Record') + ',1')
        #		select('ChildRecordsJTbl', 'cell:' + commonBits.fl('Child Record') + ',2(418)')
        #		select('ChildRecordsJTbl', 'cell:' + commonBits.fl('Child Record') + ',2(418)')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Child Records')
        select('ChildRecordsJTbl',
               'cell:' + commonBits.fl('Child Record') + ',0(416)')
        keystroke('ChildRecordsJTbl', 'Ctrl+C',
                  '' + commonBits.fl('Child Record') + ',0')
        select('ChildRecordsJTbl',
               'cell:' + commonBits.fl('Child Record') + ',0(416)')
        select('TextField', 'yyAms PO Download: D%')
        select('TextField1', '%')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(Record Type)')
        assert_p('RecordFieldsJTbl', 'Text', 'Record Type',
                 '' + commonBits.fl('FieldName') + ',0')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(Pack Qty)')
        assert_p('RecordFieldsJTbl', 'Text', '',
                 commonBits.fl('Description') + ',0')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Pack Cost)')
        assert_p('RecordFieldsJTbl', 'Text', 'Pack Cost',
                 '' + commonBits.fl('FieldName') + ',2')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',1(8)')
        ##		assert_p('RecordFieldsJTbl', 'Text', '8', '' + commonBits.fl('FieldType') + ',1')
        ##		assert_p('RecordFieldsJTbl', 'Text', commonBits.fl('Num Assumed Decimal (Zero padded)'), '' + commonBits.fl('FieldType') + ',1')

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',1(7)')
        assert_p('TextField8', 'Text',
                 commonBits.fl('Num Assumed Decimal (Zero padded)'))

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',0(0)')
        ##		assert_p('RecordFieldsJTbl', 'Text', '0', '' + commonBits.fl('FieldType') + ',4')
        ##		assert_p('RecordFieldsJTbl', 'Text', commonBits.fl('Char'), '' + commonBits.fl('FieldType') + ',4')

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',4(7)')
        assert_p('TextField8', 'Text', commonBits.fl('Char'))

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',3(7)')
        ##		assert_p('RecordFieldsJTbl', 'Text', '0', '' + commonBits.fl('FieldType') + ',4')
        ##		assert_p('RecordFieldsJTbl', 'Text', commonBits.fl('Char'), '' + commonBits.fl('FieldType') + ',4')

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',4(7)')
        assert_p('TextField8', 'Text', commonBits.fl('Char'))

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',8(Product Name)')
        assert_p('RecordFieldsJTbl', 'Text', 'Product Name',
                 '' + commonBits.fl('FieldName') + ',8')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',8(Product Name)')
        ##		assert_p('BmKeyedComboBox3', 'Text', '0')
        assert_p('BmKeyedComboBox3', 'Text', 'Unkown')
        assert_p('BmKeyedComboBox2', 'Text', commonBits.fl('Record Layout'))
        select('TextField', 'yyAms PO Download: H%')
        select('TextField1', '%')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        assert_p('TextField2', 'Text', 'yyAms PO Download: Header')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(Record Type)')
        assert_p('RecordFieldsJTbl', 'Text', 'Record Type',
                 '' + commonBits.fl('FieldName') + ',0')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Vendor)')
        assert_p('RecordFieldsJTbl', 'Text', 'Vendor',
                 '' + commonBits.fl('FieldName') + ',2')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(PO)')
        assert_p('RecordFieldsJTbl', 'Text', 'Entry Date',
                 '' + commonBits.fl('FieldName') + ',4')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',4(Entry Date)')
        assert_p('RecordFieldsJTbl', 'Text', 'Entry Date',
                 '' + commonBits.fl('FieldName') + ',4')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',6(beg01 code)')
        assert_p('RecordFieldsJTbl', 'Text', 'beg01 code',
                 '' + commonBits.fl('FieldName') + ',6')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',8(Department)')
        assert_p('RecordFieldsJTbl', 'Text', 'Department',
                 '' + commonBits.fl('FieldName') + ',8')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',1(8)')
        ##		assert_p('RecordFieldsJTbl', 'Text', '8', '' + commonBits.fl('FieldType') + ',1')
        ##		assert_p('RecordFieldsJTbl', 'Text', commonBits.fl('Num Assumed Decimal (Zero padded)'), commonBits.fl('FieldType') + ',3')

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',3(7)')
        assert_p('TextField8', 'Text',
                 commonBits.fl('Num Assumed Decimal (Zero padded)'))

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',3(8)')
        ##		assert_p('RecordFieldsJTbl', 'Text', '8', '' + commonBits.fl('FieldType') + ',3')
        ##		assert_p('RecordFieldsJTbl', 'Text', commonBits.fl('Num Assumed Decimal (Zero padded)'), '' + commonBits.fl('FieldType') + ',3')

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',3(7)')
        assert_p('TextField8', 'Text',
                 commonBits.fl('Num Assumed Decimal (Zero padded)'))

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',3(8)')
        select('TextField', 'yyAms PO Download: A%')
        select('TextField1', '%')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        assert_p('CheckBox', 'Text', 'false')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(DC Number 1)')
        assert_p('RecordFieldsJTbl', 'Text', 'DC Number 1',
                 '' + commonBits.fl('FieldName') + ',1')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Pack Quantity 1)')
        assert_p('RecordFieldsJTbl', 'Text', 'Pack Quantity 1',
                 '' + commonBits.fl('FieldName') + ',2')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(DC Number 2)')
        assert_p('RecordFieldsJTbl', 'Text', 'DC Number 2',
                 '' + commonBits.fl('FieldName') + ',3')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',4(Pack Quantity 2)')
        assert_p('RecordFieldsJTbl', 'RowCount', '19')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',2(7)')
        ##assert_p('RecordFieldsJTbl', 'Text', '7', '' + commonBits.fl('FieldType') + ',4')

        ##		assert_p('RecordFieldsJTbl', 'Text', commonBits.fl('Num (Right Justified zero padded)'), '' + commonBits.fl('FieldType') + ',4')

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldType') + ',4(7)')
        assert_p('TextField8', 'Text',
                 commonBits.fl('Num (Right Justified zero padded)'))

        # 		commonBits.delete3(click)
        select('TextField', 'yyAms PO Download')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Child Records')
        commonBits.delete3(click)

        if window(commonBits.fl('Delete: yyAms PO Download')):
            click('Yes')
        close()

        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download%')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download: A%')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        commonBits.delete3(click)

        if window(commonBits.fl('Delete: yyAms PO Download: Allocation')):
            click('Yes')
        close()

        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        select('TextField', 'yyAms PO Download: H%')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        commonBits.delete3(click)

        if window(commonBits.fl('Delete: yyAms PO Download: Header')):
            click('Yes')
        close()

        select('TextField', 'yyAms PO Download: %')
        commonBits.delete3(click)

        if window(commonBits.fl('Delete: yyAms PO Download: Detail')):
            click('Yes')
        close()
        click(commonBits.fl('Close'))

    close()