Пример #1
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Record Layout Definitions'):
		click('*7')
		select('FileChooser', commonBits.cobolDir() + 'CopySAR4180B.xml')
		select('ManagerCombo', commonBits.fl('cb2xml XML Copybook (DB)'))

		click(commonBits.fl('Go'))

		assert_p('TextArea', 'Text', commonBits.checkCopybookLoad(commonBits.cobolDir() + 'CopySAR4180B.xml', 'CopySAR4180B'))
##		assert_p('TextArea', 'Text', '''
##
##-->> ''' + commonBits.cobolDir() + '''CopySAR4180B.xml processed
##
##      Copybook: CopySAR4180B''')
		select_menu(commonBits.fl('Record Layouts') + '>>' + commonBits.fl('Edit Layout'))
		select('TextField', '%CopyS%')
		#select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Fields')
		#select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Fields')
		select('TextField1', '%')
		#select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Fields')
		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',1(R4180B-KEYCODE)')
		assert_p('RecordFieldsJTbl', 'Text', 'R4180B-KEYCODE', '' + commonBits.fl('FieldName') + ',1')
		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',2(R4180B-APN)')
##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 0, R4180B-KEYCODE-DETAIL-ID, , 0, 0, 0, , , R4180B-KEYCODE-DETAIL-ID], [4, 0, R4180B-KEYCODE, , 8, 0, 0, , , R4180B-KEYCODE], [12, 0, R4180B-APN, , 8, 0, 0, , , R4180B-APN], [25, 0, R4180B-UNIT-TYPE, , 0, 0, 0, , , R4180B-UNIT-TYPE]]')
##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 0, R4180B-KEYCODE-DETAIL-ID, , 0, 0, 0, , , R4180B-KEYCODE-DETAIL-ID], [4, 0, R4180B-KEYCODE, , 22, 0, 0, , , R4180B-KEYCODE], [12, 0, R4180B-APN, , 22, 0, 0, , , R4180B-APN], [25, 0, R4180B-UNIT-TYPE, , 0, 0, 0, , , R4180B-UNIT-TYPE]]')

		assert_p('RecordFieldsJTbl', 'Content', '[[1, 0, R4180B-KEYCODE-DETAIL-ID, , 0, 0, 0, , , R4180B-KEYCODE-DETAIL-ID], [4, 0, R4180B-KEYCODE, , 25, 0, 0, , , R4180B-KEYCODE], [12, 0, R4180B-APN, , 25, 0, 0, , , R4180B-APN], [25, 0, R4180B-UNIT-TYPE, , 0, 0, 0, , , R4180B-UNIT-TYPE]]')


		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',0(R4180B-KEYCODE-DETAIL-ID)')
		assert_p('RecordFieldsJTbl', 'RowCount', '4')
		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',0(R4180B-KEYCODE-DETAIL-ID)')
		assert_p('TextField2', 'Text', 'CopySAR4180B')
		commonBits.delete3(click)

		if window(commonBits.fl('Delete: CopySAR4180B')):
			click('Yes')
		close()

		#select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Child Records')
		#select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Child Records')
		select('TextField', '%CopySA%')
		#select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Child Records')
		assert_p('TextField2', 'Text', '')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		click(commonBits.fl('Close'))
		click(commonBits.fl('Close'))
Пример #2
0
def test():
    from Modules import commonBits
    if window('Record Layout Definitions'):
        click('*6')
        select('FileChooser', commonBits.cobolDir() + 'AmsLocation.cbl')
        click(commonBits.fl('Go'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.cobolDir() + 'AmsLocation.cbl', 'AmsLocation'))

        ##		assert_p('TextArea', 'Text', '''

        ##
        ##-->> ''' + commonBits.cobolDir() + '''AmsLocation.cbl processed

        ##
        ##      Copybook: AmsLocation''')
        select_menu(
            commonBits.fl('Record Layouts') + '>>' +
            commonBits.fl('Edit Layout'))
        select('TextField', 'AmsLo%')
        ##		select('TabbedPane', 'Extras')
        select('TextField1', '%')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #assert_p('TextField2', 'Text', 'AmsLocation')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(Brand)')
        assert_p('RecordFieldsJTbl', 'Text',
                 'cell:' + commonBits.fl('FieldName') + ',0(Brand)')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(Location-Number)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 8, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Location-Type)')
        assert_p('RecordFieldsJTbl', 'RowCount', '10')
        select('RecordFieldsJTbl',
               'rows:[2,3,4],columns:[' + commonBits.fl('FieldName') + ']')
        rightclick('RecordFieldsJTbl', '' + commonBits.fl('FieldName') + ',3')
        select_menu(commonBits.fl('Copy Record#{s#}'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',9(Location-Active)')
        rightclick('RecordFieldsJTbl', '' + commonBits.fl('FieldName') + ',9')
        select_menu(commonBits.fl('Paste Record#{s#}'))
        #click('WindowsScrollBarUI$WindowsArrowButton4')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',12(Address-1)')
        assert_p('RecordFieldsJTbl', 'RowCount', '13')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',10(Location-Type)')
        ##		assert_p('RecordFieldsJTbl', 'Text', 'cell:' + commonBits.fl('FieldName') + ',10(Location-Type)')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',9(Location-Active)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 8, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'rows:[9,10,11],columns:[' + commonBits.fl('FieldName') + ']')
        rightclick('RecordFieldsJTbl', '' + commonBits.fl('FieldName') + ',10')
        select_menu(commonBits.fl('Delete Record#{s#}'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',9(Address-1)')
        assert_p('RecordFieldsJTbl', 'RowCount', '10')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',6(Address-3)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 8, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'rows:[1,2,3],columns:[' + commonBits.fl('FieldName') + ']')
        rightclick('RecordFieldsJTbl', '' + commonBits.fl('FieldName') + ',2')
        select_menu(commonBits.fl('Cut Record#{s#}'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Address-2)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 8, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(Address-3)')
        assert_p('RecordFieldsJTbl', 'RowCount', '7')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',5(State)')
        rightclick('RecordFieldsJTbl', '' + commonBits.fl('FieldName') + ',5')
        select_menu(commonBits.fl('Paste Record#{s#} Prior'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',4(Postcode)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 8, 0, 0, , , Postcode], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',5(Location-Number)')
        assert_p('RecordFieldsJTbl', 'Text', 'Location-Number',
                 commonBits.fl('FieldName') + ',5')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',6(Location-Type)')
        assert_p('RecordFieldsJTbl', 'RowCount', '10')
        select('RecordFieldsJTbl',
               'rows:[2,3,4],columns:[' + commonBits.fl('FieldName') + ']')
        click(commonBits.fl('Delete'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(Address-1)')
        assert_p('RecordFieldsJTbl', 'RowCount', '7')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Location-Number)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Location-Number)')
        click(commonBits.fl('Insert'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Location-Number)')
        #keystroke('RecordFieldsJTbl', 'Ctrl+F9', '' + commonBits.fl('FieldName') + ',2')
        #click('BasicInternalFrameTitlePane$NoFocusButton9')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',4(Location-Type)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [0, 0, , , 0, 0, 0, , , ], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [0, 0, , , 0, 0, 0, , , ], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',5(Location-Name)')
        assert_p('RecordFieldsJTbl', 'RowCount', '8')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3()')
        click(commonBits.fl('Delete'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Location-Number)')
        assert_p('RecordFieldsJTbl', 'RowCount', '7')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(Location-Type)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'rows:[1,2,3],columns:[' + commonBits.fl('FieldName') + ']')
        commonBits.cut2(click)

        select('RecordFieldsJTbl', 'cell:' + commonBits.fl('Length') + ',2(3)')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(Location-Name)')
        assert_p('RecordFieldsJTbl', 'RowCount', '4')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(State)')
        if commonBits.isTstLanguage():
            click(commonBits.fl('Paste'))
        else:
            commonBits.paste2(click)

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(State)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',4(Location-Number)')
        assert_p('RecordFieldsJTbl', 'RowCount', '7')
        select('RecordFieldsJTbl',
               'rows:[3,4,5],columns:[' + commonBits.fl('FieldName') + ']')

        commonBits.cut2(click)

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(State)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(Brand)')
        click(commonBits.fl('Paste Prior'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Location-Type)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[45, 40, Address-1, , 0, 0, 0, , , Address-1], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [1, 3, Brand, , 0, 0, 0, , , Brand], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(Brand)')
        assert_p('RecordFieldsJTbl', 'RowCount', '7')
        select('RecordFieldsJTbl',
               'rows:[1,2,3],columns:[' + commonBits.fl('FieldName') + ']')
        click(commonBits.fl('Delete'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(Address-1)')

        commonBits.cut2(click)

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(State)')
        click(commonBits.fl('Paste Prior'))
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(State)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[45, 40, Address-1, , 0, 0, 0, , , Address-1], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [170, 3, State, , 0, 0, 0, , , State], [45, 40, Address-1, , 0, 0, 0, , , Address-1]]')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Address-1)')
        assert_p('RecordFieldsJTbl', 'RowCount', '4')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(State)')
        if commonBits.isTstLanguage():
            click(commonBits.fl('Delete') + '1')
        else:
            commonBits.delete3(click)
        if window(commonBits.fl('Delete: AmsLocation')):
            click('Yes')
        close()

        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click(commonBits.fl('Close'))

##		select_menu('File>>Exit')
    close()
Пример #3
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Layout Definitions'):
        click('*7')
        select('FileChooser', commonBits.cobolDir() + 'CopyDTAR119.cbl')
        select('ManagerCombo', commonBits.fl('Cobol Copybook (DB)'))
        select('ComputerOptionCombo', commonBits.fl('Mainframe'))
        select('BmKeyedComboBox1', 'Mainframe')
        select('BmKeyedComboBox', commonBits.fl('Fixed Length Binary'))
        #		select('BmKeyedComboBox', '2')
        #		select('BmKeyedComboBox1', '9')
        click(commonBits.fl('Go'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.cobolDir() + 'CopyDTAR119.cbl', 'CopyDTAR119'))

        ##		assert_p('TextArea', 'Text', '''

        ##
        ##-->> ''' + commonBits.cobolDir() + '''CopyDTAR119.cbl processed

        ##
        ##      Copybook: CopyDTAR119''')

        select_menu(
            commonBits.fl('Record Layouts') + '>>' +
            commonBits.fl('Edit Layout'))
        select('TextField', '%CopyDTAR%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('TextField1', '%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',3(DTAR119-CARD-NO)')
        assert_p('RecordFieldsJTbl', 'Text', 'DTAR119-CARD-NO',
                 commonBits.fl('FieldName') + ',3')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(DTAR119-TRANS-CODE)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, DTAR119-STORE-NO, , 31, 0, 0, , , DTAR119-STORE-NO], [3, 4, DTAR119-TRANS-DATE, , 31, 0, 0, , , DTAR119-TRANS-DATE], [7, 2, DTAR119-TRANS-CODE, , 31, 0, 0, , , DTAR119-TRANS-CODE], [9, 16, DTAR119-CARD-NO, , 8, 0, 0, , , DTAR119-CARD-NO], [25, 3, DTAR119-TERMINAL-ID, , 8, 0, 0, , , DTAR119-TERMINAL-ID], [28, 4, DTAR119-TRANS-NO, , 8, 0, 0, , , DTAR119-TRANS-NO], [32, 4, DTAR119-BONUS-POINTS, , 31, 0, 0, , , DTAR119-BONUS-POINTS], [36, 5, DTAR119-KEYCODE, , 31, 0, 0, , , DTAR119-KEYCODE], [41, 5, DTAR119-KEYCODE-AMT, , 31, 2, 0, , , DTAR119-KEYCODE-AMT], [46, 5, DTAR119-KEYCODE-QTY, , 31, 2, 0, , , DTAR119-KEYCODE-QTY], [51, 3, DTAR119-PROM-NO, , 31, 0, 0, , , DTAR119-PROM-NO]]')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, DTAR119-STORE-NO, , 33, 0, 0, , , DTAR119-STORE-NO], [3, 4, DTAR119-TRANS-DATE, , 33, 0, 0, , , DTAR119-TRANS-DATE], [7, 2, DTAR119-TRANS-CODE, , 33, 0, 0, , , DTAR119-TRANS-CODE], [9, 16, DTAR119-CARD-NO, , 22, 0, 0, , , DTAR119-CARD-NO], [25, 3, DTAR119-TERMINAL-ID, , 22, 0, 0, , , DTAR119-TERMINAL-ID], [28, 4, DTAR119-TRANS-NO, , 22, 0, 0, , , DTAR119-TRANS-NO], [32, 4, DTAR119-BONUS-POINTS, , 31, 0, 0, , , DTAR119-BONUS-POINTS], [36, 5, DTAR119-KEYCODE, , 33, 0, 0, , , DTAR119-KEYCODE], [41, 5, DTAR119-KEYCODE-AMT, , 31, 2, 0, , , DTAR119-KEYCODE-AMT], [46, 5, DTAR119-KEYCODE-QTY, , 31, 2, 0, , , DTAR119-KEYCODE-QTY], [51, 3, DTAR119-PROM-NO, , 33, 0, 0, , , DTAR119-PROM-NO]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 2, DTAR119-STORE-NO, , 33, 0, 0, , , DTAR119-STORE-NO], [3, 4, DTAR119-TRANS-DATE, , 33, 0, 0, , , DTAR119-TRANS-DATE], [7, 2, DTAR119-TRANS-CODE, , 33, 0, 0, , , DTAR119-TRANS-CODE], [9, 16, DTAR119-CARD-NO, , 25, 0, 0, , , DTAR119-CARD-NO], [25, 3, DTAR119-TERMINAL-ID, , 25, 0, 0, , , DTAR119-TERMINAL-ID], [28, 4, DTAR119-TRANS-NO, , 25, 0, 0, , , DTAR119-TRANS-NO], [32, 4, DTAR119-BONUS-POINTS, , 31, 0, 0, , , DTAR119-BONUS-POINTS], [36, 5, DTAR119-KEYCODE, , 33, 0, 0, , , DTAR119-KEYCODE], [41, 5, DTAR119-KEYCODE-AMT, , 31, 2, 0, , , DTAR119-KEYCODE-AMT], [46, 5, DTAR119-KEYCODE-QTY, , 31, 2, 0, , , DTAR119-KEYCODE-QTY], [51, 3, DTAR119-PROM-NO, , 33, 0, 0, , , DTAR119-PROM-NO]]'
        )

        select(
            'RecordFieldsJTbl',
            'cell:' + commonBits.fl('FieldName') + ',6(DTAR119-BONUS-POINTS)')
        assert_p('RecordFieldsJTbl', 'RowCount', '11')
        select(
            'RecordFieldsJTbl',
            'cell:' + commonBits.fl('FieldName') + ',8(DTAR119-KEYCODE-AMT)')
        assert_p(
            'RecordFieldsJTbl', 'Text',
            'cell:' + commonBits.fl('FieldName') + ',8(DTAR119-KEYCODE-AMT)')
        select(
            'RecordFieldsJTbl',
            'cell:' + commonBits.fl('FieldName') + ',8(DTAR119-KEYCODE-AMT)')
        assert_p('TextField2', 'Text', 'CopyDTAR119')
        if commonBits.isTstLanguage():
            click(commonBits.fl('Delete') + '1')
        else:
            commonBits.delete3(click)
        if window(commonBits.fl('Delete: CopyDTAR119')):
            click('Yes')
        close()

        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click(commonBits.fl('Close'))
##		select_menu('File>>Exit')
    close()
Пример #4
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Layout Definitions'):
        click('*6')
        select('FileChooser', commonBits.cobolDir() + 'CopyDTAR020.cbl')
        select('ComputerOptionCombo', commonBits.fl('Mainframe'))
        select('BmKeyedComboBox1', 'Mainframe')
        select('BmKeyedComboBox', commonBits.fl('Fixed Length Binary'))

        #		select('BmKeyedComboBox1', '9')
        #		select('BmKeyedComboBox', '2')

        click(commonBits.fl('Go'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.cobolDir() + 'CopyDTAR020.cbl', 'CopyDTAR020'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.cobolDir() + 'CopyDTAR020.cbl', 'CopyDTAR020'))

        ##		assert_p('TextArea', 'Text', '''

        ##
        ##-->> ''' + commonBits.cobolDir() + '''CopyDTAR020.cbl processed

        ##
        ##      Copybook: CopyDTAR020''')
        select_menu(
            commonBits.fl('Record Layouts') + '>>' +
            commonBits.fl('Edit Layout'))

        select('TextField', '%CopyDTA%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('TextField1', '%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(DTAR020-DATE)')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 8, DTAR020-KEYCODE-NO, , 0, 0, 0, , , DTAR020-KEYCODE-NO], [9, 2, DTAR020-STORE-NO, , 31, 0, 0, , , DTAR020-STORE-NO], [11, 4, DTAR020-DATE, , 31, 0, 0, , , DTAR020-DATE], [15, 2, DTAR020-DEPT-NO, , 31, 0, 0, , , DTAR020-DEPT-NO], [17, 5, DTAR020-QTY-SOLD, , 31, 0, 0, , , DTAR020-QTY-SOLD], [22, 6, DTAR020-SALE-PRICE, , 31, 2, 0, , , DTAR020-SALE-PRICE]]'
        )
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(DTAR020-STORE-NO)')
        assert_p('RecordFieldsJTbl', 'RowCount', '6')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(DTAR020-STORE-NO)')
        assert_p('TextField2', 'Text', 'CopyDTAR020')
        if commonBits.isTstLanguage():
            click(commonBits.fl('Delete') + '1')
        else:
            commonBits.delete3(click)
        if window(commonBits.fl('Delete: CopyDTAR020')):
            click('Yes')
        close()

        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click(commonBits.fl('Close'))

##		select_menu('File>>Exit')
    close()
Пример #5
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Record Layout Definitions'):
		click('*6')
		select('FileChooser', commonBits.cobolDir() + 'AmsLocation.cbl')
		click(commonBits.fl('Go')
)

		assert_p('TextArea', 'Text', '\n\n' + commonBits.fl('-->> ' + commonBits.cobolDir() + 'AmsLocation.cbl processed\n\n      Copybook: AmsLocation'))
		
		assert_p('TextArea', 'Text', commonBits.checkCopybookLoad(commonBits.cobolDir() + 'AmsLocation.cbl', 'AmsLocation'))

##		assert_p('TextArea', 'Text', ('''
##
##-->> ''' + commonBits.cobolDir() + '''AmsLocation.cbl processed
##
##      Copybook: AmsLocation''')

		
		select_menu(commonBits.fl('Record Layouts') + '>>' + commonBits.fl('Edit Layout'))

		select('TextField', 'AmsLo%')
		select('TabbedPane', commonBits.fl('Extras'))
		select('TextField1', '%')
		#select('TabbedPane', 'Fields')
		###select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Fields')
		#assert_p('TextField2', 'Text', 'AmsLocation')
		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',0(Brand)')
		assert_p('RecordFieldsJTbl', 'Text', 'cell:' + commonBits.fl('FieldName') + ',0(Brand)')
		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',1(Location-Number)')
##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 8, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 8, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active]]')
##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 22, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 22, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active]]')

		assert_p('RecordFieldsJTbl', 'Content', '[[1, 3, Brand, , 0, 0, 0, , , Brand], [4, 4, Location-Number, , 25, 0, 0, , , Location-Number], [8, 2, Location-Type, , 0, 0, 0, , , Location-Type], [10, 35, Location-Name, , 0, 0, 0, , , Location-Name], [45, 40, Address-1, , 0, 0, 0, , , Address-1], [85, 40, Address-2, , 0, 0, 0, , , Address-2], [125, 35, Address-3, , 0, 0, 0, , , Address-3], [160, 10, Postcode, , 25, 0, 0, , , Postcode], [170, 3, State, , 0, 0, 0, , , State], [173, 1, Location-Active, , 0, 0, 0, , , Location-Active]]')


		select('RecordFieldsJTbl', 'cell:' + commonBits.fl('FieldName') + ',2(Location-Type)')
		assert_p('RecordFieldsJTbl', 'RowCount', '10')

		if commonBits.isTstLanguage():
			click(commonBits.fl('Delete') + '1')

		else:
			commonBits.delete3(click)

		if window(commonBits.fl('Delete: AmsLocation')):
			click('Yes')
		close()

		###select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Child Records')
		###select('TabbedPane', 'Extras')
		#select('TabbedPane', 'Child Records')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		click(commonBits.fl('Close')
)
Пример #6
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Layout Definitions'):
        click('*6')
        select('FileChooser', commonBits.cobolDir() + 'CopyDTAR192.cbl')
        select('ComputerOptionCombo', commonBits.fl('Mainframe'))
        select('BmKeyedComboBox1', 'Mainframe')

        #		select('BmKeyedComboBox1', '9')
        click(commonBits.fl('Go'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.cobolDir() + 'CopyDTAR192.cbl', 'CopyDTAR192'))

        ##		assert_p('TextArea', 'Text', '''

        ##
        ##-->> ''' + commonBits.cobolDir() + '''CopyDTAR192.cbl processed

        ##
        ##      Copybook: CopyDTAR192''')
        select_menu(
            commonBits.fl('Record Layouts') + '>>' +
            commonBits.fl('Edit Layout'))
        select('TextField', '%CopyDTAR192%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('TextField1', '%')
        #		select('TabbedPane', 'Extras')
        #		select('TabbedPane', 'Fields')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(DTAR192-Date)')
        assert_p('RecordFieldsJTbl', 'Text', 'DTAR192-Date',
                 commonBits.fl('FieldName') + ',1')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(DTAR192-Days)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, DTAR192-Code, , 35, 0, 0, , , DTAR192-Code], [3, 4, DTAR192-Date, , 31, 0, 0, , , DTAR192-Date], [7, 2, DTAR192-Days, , 35, 0, 0, , , DTAR192-Days]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 2, DTAR192-Code, , 39, 0, 0, , , DTAR192-Code], [3, 4, DTAR192-Date, , 33, 0, 0, , , DTAR192-Date], [7, 2, DTAR192-Days, , 39, 0, 0, , , DTAR192-Days]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(DTAR192-Code)')
        assert_p('RecordFieldsJTbl', 'RowCount', '3')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(DTAR192-Code)')
        assert_p('TextField2', 'Text', 'CopyDTAR192')
        commonBits.delete3(click)
        ##		if commonBits.isTstLanguage():
        ##			click(commonBits.fl('Delete') + '1')
        ##		else:
        ##			commonBits.delete3(click)
        if window(commonBits.fl('Delete: CopyDTAR192')):
            click('Yes')
        close()

        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('ComputerOptionCombo', commonBits.fl('Intel'))
        click(commonBits.fl('Go'))
        select_menu(
            commonBits.fl('Record Layouts') + '>>' +
            commonBits.fl('Edit Layout'))

        select('TextField', '%CopyDTAR1%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('TextField1', '%')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(DTAR192-Date)')
        assert_p('RecordFieldsJTbl', 'Text', 'DTAR192-Date',
                 commonBits.fl('FieldName') + ',1')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(DTAR192-Days)')
        assert_p('RecordFieldsJTbl', 'Text',
                 'cell:' + commonBits.fl('FieldName') + ',2(DTAR192-Days)')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',0(DTAR192-Code)')
        ##		assert_p('RecordFieldsJTbl', 'Content', '[[1, 2, DTAR192-Code, , 15, 0, 0, , , DTAR192-Code], [3, 4, DTAR192-Date, , 31, 0, 0, , , DTAR192-Date], [7, 2, DTAR192-Days, , 15, 0, 0, , , DTAR192-Days]]')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 2, DTAR192-Code, , 23, 0, 0, , , DTAR192-Code], [3, 4, DTAR192-Date, , 33, 0, 0, , , DTAR192-Date], [7, 2, DTAR192-Days, , 23, 0, 0, , , DTAR192-Days]]'
        )

        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(DTAR192-Days)')
        assert_p('RecordFieldsJTbl', 'RowCount', '3')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(DTAR192-Days)')
        assert_p('TextField2', 'Text', 'CopyDTAR192')
        ##		commonBits.delete3(click)
        commonBits.delete3(click)

        if window(commonBits.fl('Delete: CopyDTAR192')):
            click('Yes')
        close()

        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Child Records')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click(commonBits.fl('Close'))

##		select_menu('File>>Exit')
    close()
Пример #7
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()
Пример #8
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Layout Definitions'):
        click('*7')
        select('FileChooser',
               commonBits.cobolDir() + 'ZC_AmsPoDownloadTab.Txt')
        select('ManagerCombo',
               commonBits.fl('RecordEditor Tab Copybook (Tab Seperator)'))
        ##select('BmKeyedComboBox1', '32')
        click(commonBits.fl('Go'))

        assert_p(
            'TextArea', 'Text',
            commonBits.checkCopybookLoad(
                commonBits.cobolDir() + 'ZC_AmsPoDownloadTab.Txt',
                'ZC_AmsPoDownloadTab'))

        ##		assert_p('TextArea', 'Text', '''
        ##
        ##-->> ''' + commonBits.cobolDir() + '''ZC_AmsPoDownloadTab.Txt processed
        ##
        ##      Copybook: ZC_AmsPoDownloadTab''')
        select_menu(
            commonBits.fl('Record Layouts') + '>>' +
            commonBits.fl('Edit Layout'))
        select('TextField', 'ZC_AmsPoDownloadTab%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('TextField1', '%')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',1(Pack Qty)')
        assert_p('RecordFieldsJTbl', 'Text', 'Pack Cost',
                 commonBits.fl('FieldName') + ',2')
        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') + ',3(APN)')
        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('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',6(pmg dtl tech key)')
        assert_p('RecordFieldsJTbl', 'Text', 'pmg dtl tech key',
                 commonBits.fl('FieldName') + ',6')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',7(Case Pack id)')
        assert_p('RecordFieldsJTbl', 'RowCount', '9')
        select('RecordFieldsJTbl',
               'cell:' + commonBits.fl('FieldName') + ',2(Pack Cost)')
        assert_p('TextField2', 'Text', 'ZC_AmsPoDownloadTab')
        click('Delete')

        if window(commonBits.fl('Delete: ZC_AmsPoDownloadTab')):
            click('Yes')
        close()

        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        #select('TabbedPane', 'Extras')
        #select('TabbedPane', 'Fields')
        assert_p('TextField2', 'Text', '')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('BasicInternalFrameTitlePane$NoFocusButton2')

        click(commonBits.fl('Close'))
    close()