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()
def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_03'

	if window('Protocol Buffer Editor'):
		click('Choose File')

		if window('Open'):
			select(commonBits.selectPane(), 'ams_locdownload_20041228.bin')
			click('Open')
		close()

		click('Edit1')
		click('Filter1')
		select('Table1', 'Loc_Type', 'Field,0')
		select('Table1', 'st', 'Value,0')
		select('Table1', 'cell:Field,2(null)')
		click('Save1')
		##select('FileChooser', commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')
		commonBits.selectFileName(select, commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')
		click('Save1')
		select_menu('Window>>ams_locdownload_20041228.bin>>Filter Options')
		click('Filter1')
		select('Table', 'cell:4|Loc_Name,0(Bankstown)')
		assert_p('Table', 'Text', 'Bankstown', '4|Loc_Name,0')
		select('Table', 'cell:3|Loc_Type,1(ST)')
		rightclick('Table', '3|Loc_Type,1')
		select_menu('Edit Record')
##		select('Table1', 'cell:3|Loc_Type,1(ST)')
		select('Table', 'cell:Data,5(58 Leland Street)')
		assert_p('Table', 'Text', 'Penrith', 'Data,6')
		select('Table', 'cell:Data,5(58 Leland Street)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5019, 5019], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Penrith, Penrith], [Loc_Addr_Ln1, 5, , Penrith, Penrith], [Loc_Addr_Ln2, 6, , 58 Leland Street, 58 Leland Street], [Loc_Addr_Ln3, 7, , Penrith, Penrith], [Loc_Postcode, 8, , 2750, 2750], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,5(58 Leland Street)')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('Table', 'cell:3|Loc_Type,1(ST)')
		select('Table', 'cell:3|Loc_Type,1(ST)')
		select_menu('Window>>ams_locdownload_20041228.bin>>Table:')
		select('Table2', 'cell:3|Loc_Type,1(ST)')
		select_menu('View>>Execute Saved Filter')
		#select('FileChooser', commonBits.userDir() + 'Filter'  + commonBits.fileSep() +'xx1')
		commonBits.selectFileName(select, commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')

		click('Run')
		select('Table', 'cell:4|Loc_Name,2(Blacktown)')
		assert_p('Table', 'Text', 'Blacktown', '4|Loc_Name,2')
		select('Table', 'cell:4|Loc_Name,5(Eastwood)')
		rightclick('Table', '4|Loc_Name,5')
		select_menu('Edit Record')
##		select('Table1', 'cell:4|Loc_Name,5(Eastwood)')
		select('Table', 'cell:Data,4(Marayong Offsite Reserve)')
		assert_p('Table', 'Text', 'Marayong Offsite Reserve', 'Data,4')
		select('Table', 'cell:Data,4(Marayong Offsite Reserve)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5052, 5052], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Eastwood, Eastwood], [Loc_Addr_Ln1, 5, , Marayong Offsite Reserve, Marayong Offsite Reserve], [Loc_Addr_Ln2, 6, , 11 Melissa Place, 11 Melissa Place], [Loc_Addr_Ln3, 7, , Marayong, Marayong], [Loc_Postcode, 8, , 2148, 2148], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
	close()
Beispiel #3
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Record Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Xml' + commonBits.fileSep() + 'AmsLocationTest1.xml')
		commonBits.doEdit(click)
##		select('JTreeTable', '')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',4')
		select_menu(commonBits.fl('Expand Tree'))##		select('JTreeTable', '')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',6')
		select_menu(commonBits.fl('Expand Tree'))
		select('LayoutCombo', 'item')
		assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'level,7')
		select_menu(commonBits.fl('Hide Column'))
		assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , ], [, , ******************************, , , , , , , , , ], [, , * Location Download, , , , , , , , , ], [, , ******************************, , , , , , , , , ], [, , , , 173, Ams-Vendor, 1, 173, , , , ], [, , , , 3, Brand, 1, 3, x(3), , True, ], [, , , , 41, Location-Details, 4, 41, , , , ], [, , , , 4, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, Location-Type, 8, 2, XX, , True, ], [, , , , 35, Location-Name, 10, 35, X(35), , True, ], [, , , , 128, Full-Address, 45, 128, , , , ], [, , , , 1, Location-Active, 173, 1, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'name,7')
		select_menu(commonBits.fl('Hide Column'))
		assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , ], [, , ******************************, , , , , , , , ], [, , * Location Download, , , , , , , , ], [, , ******************************, , , , , , , , ], [, , , , 173, 1, 173, , , , ], [, , , , 3, 1, 3, x(3), , True, ], [, , , , 41, 4, 41, , , , ], [, , , , 4, 4, 4, 9(4), true, True, ], [, , , , 2, 8, 2, XX, , True, ], [, , , , 35, 10, 35, X(35), , True, ], [, , , , 128, 45, 128, , , , ], [, , , , 1, 173, 1, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'position,7')
		select_menu(commonBits.fl('Hide Column'))
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'storage-length,6')
		select_menu(commonBits.fl('Hide Column'))
		assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , , , ], [, , ******************************, , , , , , ], [, , * Location Download, , , , , , ], [, , ******************************, , , , , , ], [, , , , 173, , , , ], [, , , , 3, x(3), , True, ], [, , , , 41, , , , ], [, , , , 4, 9(4), true, True, ], [, , , , 2, XX, , True, ], [, , , , 35, X(35), , True, ], [, , , , 128, , , , ], [, , , , 1, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'display-length,6')
		select_menu(commonBits.fl('Hide Column'))
		assert_p('JTreeTable', 'Content', '[[, , , , , , , ], [, , ******************************, , , , , ], [, , * Location Download, , , , , ], [, , ******************************, , , , , ], [, , , , , , , ], [, , , , x(3), , True, ], [, , , , , , , ], [, , , , 9(4), true, True, ], [, , , , XX, , True, ], [, , , , X(35), , True, ], [, , , , , , , ], [, , , , X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'picture,7')
		select_menu(commonBits.fl('Show Column') + '>>name')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , ], [, , ******************************, , , , , , ], [, , * Location Download, , , , , , ], [, , ******************************, , , , , , ], [, , , , Ams-Vendor, , , , ], [, , , , Brand, x(3), , True, ], [, , , , Location-Details, , , , ], [, , , , Location-Number, 9(4), true, True, ], [, , , , Location-Type, XX, , True, ], [, , , , Location-Name, X(35), , True, ], [, , , , Full-Address, , , , ], [, , , , Location-Active, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'picture,6')
		select_menu(commonBits.fl('Show Column') + '>>position')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , , ], [, , ******************************, , , , , , , ], [, , * Location Download, , , , , , , ], [, , ******************************, , , , , , , ], [, , , , Ams-Vendor, 1, , , , ], [, , , , Brand, 1, x(3), , True, ], [, , , , Location-Details, 4, , , , ], [, , , , Location-Number, 4, 9(4), true, True, ], [, , , , Location-Type, 8, XX, , True, ], [, , , , Location-Name, 10, X(35), , True, ], [, , , , Full-Address, 45, , , , ], [, , , , Location-Active, 173, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'position,8')
		select_menu(commonBits.fl('Show Column') + '>>storage-length')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , , , ], [, , ******************************, , , , , , , , ], [, , * Location Download, , , , , , , , ], [, , ******************************, , , , , , , , ], [, , , , Ams-Vendor, 1, 173, , , , ], [, , , , Brand, 1, 3, x(3), , True, ], [, , , , Location-Details, 4, 41, , , , ], [, , , , Location-Number, 4, 4, 9(4), true, True, ], [, , , , Location-Type, 8, 2, XX, , True, ], [, , , , Location-Name, 10, 35, X(35), , True, ], [, , , , Full-Address, 45, 128, , , , ], [, , , , Location-Active, 173, 1, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'storage-length,8')
		select_menu(commonBits.fl('Show Column') + '>>level')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , , , , ], [, , ******************************, , , , , , , , , ], [, , * Location Download, , , , , , , , , ], [, , ******************************, , , , , , , , , ], [, , , , 01, Ams-Vendor, 1, 173, , , , ], [, , , , 03, Brand, 1, 3, x(3), , True, ], [, , , , 03, Location-Details, 4, 41, , , , ], [, , , , 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 05, Location-Type, 8, 2, XX, , True, ], [, , , , 05, Location-Name, 10, 35, X(35), , True, ], [, , , , 03, Full-Address, 45, 128, , , , ], [, , , , 03, Location-Active, 173, 1, X, , True, ]]')
#		select('JTreeTable', '')
		rightclick('JTreeTable', 'name,7')
		select_menu(commonBits.fl('Show Column') + '>>display-length')
		assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')
	close()
Beispiel #4
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Record Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Xml' + commonBits.fileSep() + 'AmsLocationTest1.xml')
		commonBits.doEdit(click)

		select('JTreeTable', 'cell:Xml~Text,1(******************************)')
		click('Delete1')
		select('JTreeTable', 'cell:Xml~Text,1(* Location Download)')

		assert_p('JTreeTable', 'Content', '[[, , , , ], [, , * Location Download, , ], [, , ******************************, , ], [, , , , ]]')

		select('JTreeTable', 'cell:Xml~Text,3(null)')
		rightclick('JTreeTable', 'Xml~Text,3')
		select_menu(commonBits.fl('Expand Tree'))
		select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',5(null)')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',5')
		select_menu(commonBits.fl('Copy Record#{s#}'))
		select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',1(null)')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',1')
		select_menu(commonBits.fl('Paste Record#{s#}'))
		select('JTreeTable', 'cell:Xml~Text,2(null)')
		rightclick('JTreeTable', 'Xml~Text,2')
		select_menu(commonBits.fl('Expand Tree'))
		select('LayoutCombo', 'item')
		select('JTreeTable', 'cell:name,3(Location-Number)')
		assert_p('JTreeTable', 'Text', 'Location-Number', 'name,3')
		select('JTreeTable', 'cell:name,4(Location-Type)')

		assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ]]')

		select('JTreeTable', 'cell:name,3(Location-Number)')
		assert_p('JTreeTable', 'RowCount', '8')
		select('JTreeTable', 'rows:[3,4],columns:[' + commonBits.fl('Tree') + ']')
		click('Delete1')
		select('JTreeTable', 'cell:name,2(Location-Details)')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')

		if window(commonBits.fl('Save Changes to file: ' + commonBits.sampleDir() + 'Xml' + commonBits.fileSep() + 'AmsLocationTest1.xml')):
			click('No')
		close()
	close()
Beispiel #5
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_17'

    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'IVM0034_Map.XML')

        commonBits.doEdit(click)
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',1')
        select_menu(commonBits.fl('Expand Tree'))
        click('ScrollPane$ScrollBar', 5, 65)
        #		select('JTreeTable', '')
        rightclick('JTreeTable', 'id,3')
        select_menu(commonBits.fl('Edit Record'))
        #		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',4')
        select_menu(commonBits.fl('Hide Column'))
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 1, 1], [LENGTH, 7, , 23, 23], [INITIAL, 8, ,  REPLENISHMENT ORDERING,  REPLENISHMENT ORDERING], [ATTRB, 9, , (ASKIP,BRT), (ASKIP,BRT)], [id, 10, , , ], [Type, 11, , , ], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        ##		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',5')
        select_menu(commonBits.fl('Hide Column'))
        ##		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',5')
        select_menu(commonBits.fl('Hide Column'))
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 1, 1], [LENGTH, 7, , 23, 23], [id, 10, , , ], [Type, 11, , , ], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        select('Table', 'cell:' + commonBits.fl('Data') + ',4(23)')
        select('Table', 'cell:' + commonBits.fl('Data') + ',4(23)')
        rightclick('Table', commonBits.fl('Data') + ',4')
        select_menu(commonBits.fl('Show Field Fields') + '>>INITIAL')
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 1, 1], [LENGTH, 7, , 23, 23], [INITIAL, 8, ,  REPLENISHMENT ORDERING,  REPLENISHMENT ORDERING], [id, 10, , , ], [Type, 11, , , ], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        ##		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',6')
        select_menu(commonBits.fl('Show Field Fields') + '>>ATTRB')
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 1, 1], [LENGTH, 7, , 23, 23], [INITIAL, 8, ,  REPLENISHMENT ORDERING,  REPLENISHMENT ORDERING], [ATTRB, 9, , (ASKIP,BRT), (ASKIP,BRT)], [id, 10, , , ], [Type, 11, , , ], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        ##		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',3')
        select_menu(commonBits.fl('Show Field Fields') + '>>Col')
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 1, 1], [Col, 6, , 26, 26], [LENGTH, 7, , 23, 23], [INITIAL, 8, ,  REPLENISHMENT ORDERING,  REPLENISHMENT ORDERING], [ATTRB, 9, , (ASKIP,BRT), (ASKIP,BRT)], [id, 10, , , ], [Type, 11, , , ], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Beispiel #6
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window('Record Editor'):
        click('Choose File')

        if window('Open'):
            select(commonBits.selectPane(),
                   'utf8a_Ams_PODownload_20041231.txt')
            click('Open')
        close()

        commonBits.setRecordLayout(select, 'utf8_ams PO Download')
        click('Edit1')
        select_menu('View>>Record Based Tree')
        select('Table', 'ams PO Download: Header', 'Parent Record,0')
        select('Table', 'ams PO Download: Detail', 'Parent Record,2')
        #		select('Table', '1', 'Parent Record,0')
        #		select('Table', '0', 'Parent Record,2')
        select('Table', 'cell:Parent Record,2(0)')
        click('Save1')
        ##select('FileChooser', commonBits.userDir() +  'RecordTree'  + commonBits.fileSep() + 'xx')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'RecordTree' + commonBits.fileSep() + 'xx')
        click('Save1')
        select_menu(
            'Window>>utf8a_Ams_PODownload_20041231.txt>>Create Record Tree')
        click('Build')
        select('JTreeTable', 'cell:PO,0(286225)')
        assert_p('JTreeTable', 'Text', '286225', 'PO,0')
        select('JTreeTable', 'cell:PO,0(286225)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , H1, 45.349, 6060, 286225, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.350, 6228, 222227, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.351, 6228, 222243, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.352, 5341, 294915, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.353, 5341, 294987, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.354, 5341, 295139, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.355, 5341, 303662, 041110, , 00, , 310, 041231, 050107, P, , , YOUTH SHOE, C, FT], [, , H1, 45.356, 5341, 304100, 041111, , 00, , 310, 041231, 050107, P, , , YOUTH SHOE, C, FT]]'
        )
        select('JTreeTable', 'cell:PO,0(286225)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select_menu('Window>>utf8a_Ams_PODownload_20041231.txt>>Table:')
        select_menu('View>>Execute Record Tree')
        ##select('FileChooser',  commonBits.userDir() +  'RecordTree'  + commonBits.fileSep() + 'xx')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'RecordTree' + commonBits.fileSep() + 'xx')
        click('Run Dialog')
        select('Table', 'cell:Record,1(ams PO Download: Header)')
        assert_p(
            'Table', 'Content',
            '[[ams PO Download: Detail, 1], [ams PO Download: Header, -1], [ams PO Download: Allocation, 0]]'
        )
        select('Table', 'cell:Record,1(ams PO Download: Header)')
        click('Build')
        select('JTreeTable', 'cell:PO,0(286225)')
        assert_p('JTreeTable', 'Text', '222227', 'PO,1')
        select('JTreeTable', 'cell:PO,3(294915)')
        assert_p('JTreeTable', 'Text', '294915', 'PO,3')
        select('JTreeTable', 'cell:PO,3(294915)')
        select('JTreeTable', 'cell:PO,5(295139)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , H1, 45.349, 6060, 286225, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.350, 6228, 222227, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.351, 6228, 222243, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.352, 5341, 294915, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.353, 5341, 294987, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.354, 5341, 295139, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.355, 5341, 303662, 041110, , 00, , 310, 041231, 050107, P, , , YOUTH SHOE, C, FT], [, , H1, 45.356, 5341, 304100, 041111, , 00, , 310, 041231, 050107, P, , , YOUTH SHOE, C, FT]]'
        )
        select('JTreeTable', 'cell:PO,5(295139)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select_menu('Window>>utf8a_Ams_PODownload_20041231.txt>>Table:')
        select_menu('View>>Execute Record Tree')
        ##select('FileChooser', commonBits.userDir() +  'RecordTree'  + commonBits.fileSep() + 'xx')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'RecordTree' + commonBits.fileSep() + 'xx')
        click('Run')
        select('JTreeTable', 'cell:Sequence Number,2(45.351)')
        assert_p('JTreeTable', 'Text', '45.352', 'Sequence Number,3')
        select('JTreeTable', 'cell:PO,5(295139)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , H1, 45.349, 6060, 286225, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.350, 6228, 222227, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.351, 6228, 222243, 040909, , 00, , 200, 050102, 050107, , , , LADIES KNI, C, FT], [, , H1, 45.352, 5341, 294915, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.353, 5341, 294987, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.354, 5341, 295139, 041013, , 00, , 475, 041231, 050107, P, , , WOMENS SHO, C, FT], [, , H1, 45.355, 5341, 303662, 041110, , 00, , 310, 041231, 050107, P, , , YOUTH SHOE, C, FT], [, , H1, 45.356, 5341, 304100, 041111, , 00, , 310, 041231, 050107, P, , , YOUTH SHOE, C, FT]]'
        )
        select('JTreeTable', 'cell:PO,5(295139)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Beispiel #7
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window('Record Editor'):
        select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin')

        click(commonBits.fl('Edit') + '1')
        select_menu(
            commonBits.fl('View') + '>>' + commonBits.fl('Sorted Field Tree'))
        #		select('List', 'DTAR020')
        #		select('List', 'DTAR020')
        select('Table', 'cell:' + commonBits.fl('Field') + ',0( )')
        #		select('List', 'DTAR020')
        select('Table', 'DEPT-NO', commonBits.fl('Field') + ',0')
        select('Table', 'DATE', commonBits.fl('Field') + ',1')
        select('Table', 'cell:' + commonBits.fl('Field') + ',1(DATE)')
        select('Table1', 'cell:' + commonBits.fl('Function') + ',2()')
        select('Table', 'cell:' + commonBits.fl('Field') + ',1(DATE)')
        select('Table1', commonBits.fl('Maximum'),
               commonBits.fl('Function') + ',2')
        select('Table1', commonBits.fl('Maximum'),
               commonBits.fl('Function') + ',3')
        select('Table1', commonBits.fl('Sum'),
               commonBits.fl('Function') + ',4')
        select('Table1', commonBits.fl('Sum'),
               commonBits.fl('Function') + ',5')
        select('Table1', 'cell:' + commonBits.fl('Function') + ',5(Sum)')

        commonBits.save(click)
        ##commonBits.save1(click)
        ##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'SortTree' + commonBits.fileSep() + 'xx1')
        commonBits.save1(click)
        select_menu(
            commonBits.fl('Window') + '>>DTAR020.bin>>' +
            commonBits.fl('Create Sorted Tree'))
        click(commonBits.fl('Build Tree'))
        select('JTreeTable', 'cell:DATE,0(40118)')
        assert_p('JTreeTable', 'Text', '40118', 'DATE,0')
        select('JTreeTable', 'cell:DEPT-NO,0(60)')
        assert_p('JTreeTable', 'Text', '5', 'QTY-SOLD,2')
        select('JTreeTable', 'cell:SALE-PRICE,0(8.74)')
        assert_p('JTreeTable', 'Text', '166.94', 'SALE-PRICE,1')
        select('JTreeTable', 'cell:SALE-PRICE,1(166.94)')
        assert_p('JTreeTable', 'Text', '166.94', 'SALE-PRICE,1')
        select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',1(null)')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',1')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:QTY-SOLD,2(8)')
        assert_p('JTreeTable', 'Text', '5', 'QTY-SOLD,3')
        select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',2(null)')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',2')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:SALE-PRICE,3(12.99)')
        assert_p('JTreeTable', 'Text', '12.99', 'SALE-PRICE,4')
        select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',14(null)')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',14')
        select_menu(commonBits.fl('Edit Record'))
        select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',14(null)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select_menu(
            commonBits.fl('Window') + '>>DTAR020.bin>>' +
            commonBits.fl('Table:'))
        select_menu(
            commonBits.fl('View') + '>>' + commonBits.fl('Execute Sort Tree'))
        ##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'SortTree' + commonBits.fileSep() + 'xx1')
        ##if commonBits.isJava7():
        ##	keystroke('File Name', 'Enter')

        click(commonBits.fl('Run Dialog'))

        #		select('List', 'DTAR020')
        #		select('List', 'DTAR020')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)')
        #		select('List', 'DTAR020')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)')
        assert_p(
            'Table1', 'Content', '[[KEYCODE-NO, ], [STORE-NO, ], [DATE, ' +
            commonBits.fl('Maximum') + '], [DEPT-NO, ' +
            commonBits.fl('Maximum') + '], [QTY-SOLD, ' +
            commonBits.fl('Sum') + '], [SALE-PRICE, ' + commonBits.fl('Sum') +
            ']]')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)')
        select('Table', 'cell:' + commonBits.fl('Ascending') + ',0(true)')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)')
        select('Table', 'cell:' + commonBits.fl('Ascending') + ',0(false)')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)')
        assert_p(
            'Table', 'Content',
            '[[DEPT-NO, true], [DATE, true], [ , true], [ , true], [ , true]]')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',1(STORE-NO)')
        click(commonBits.fl('Build Tree'))
        select('JTreeTable', 'cell:SALE-PRICE,1(166.94)')
        assert_p('JTreeTable', 'Text', '166.94', 'SALE-PRICE,1')
        select('JTreeTable', 'cell:SALE-PRICE,5(150.26)')
        assert_p('JTreeTable', 'Text', '150.26', 'SALE-PRICE,5')
    close()
Beispiel #8
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window('Record Editor'):
        commonBits.selectOldFilemenu(select_menu, 'Utilities', 'Compare Menu')
        click('*1')
        click('Choose File')

        if window('Open'):
            select(commonBits.selectPane(),
                   'Ams_LocDownload_20041228_Extract.txt')
            click('Open')
        close()

        click('Choose File1')

        if window('Open'):
            select(commonBits.selectPane(),
                   'Ams_LocDownload_20041228_Extract2.txt')
            click('Open')
        close()

        commonBits.setRecordLayout2(select, 'ams Store')

        click('Right')
        select('TabbedPane', '')
        click('Right')
        select('TabbedPane', '')
        click('Choose File')

        if window('Save'):
            select(commonBits.selectPane(), 'Compare')
            ##doubleclick(commonBits.selectPane(), '0')
            select(commonBits.selectPane(), 'zzTest_asmLocation.Xml')

            ##if commonBits.isWindowsLook():
            ##	select(commonBits.selectPane(), 'zzTest_asmLocation.Xml')
            ##else:
            ##	select('File Name', 'zzTest_asmLocation.Xml')

            click('Open')

        close()

        click('Save1')
        assert_p('TextField', 'Text', '')
        assert_p('TextArea', 'Text', '')
        click('Compare')
        select('Table', 'cell:Loc Name,3(VIC West Ad Support)')
        assert_p('Table', 'Text', 'VIC West Ad Support', 'Loc Name,3')
        select('Table', 'cell:Loc Name,6(Miranda)')
        assert_p('Table', 'Text', 'Miranda', 'Loc Name,6')
        select('Table', 'cell:Loc Name,7(Ringwood)')
        assert_p(
            'Table', 'Content',
            '[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive &  Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 0830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]'
        )
        select('Table', 'cell:Loc Name,7(Ringwood)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('*')
        ##select('FileChooser', commonBits.userDir() + 'Compare' + commonBits.fileSep() + 'zzTest_asmLocation.Xml')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'Compare' + commonBits.fileSep() +
            'zzTest_asmLocation.Xml')
        click('Run Compare')
        select('Table', 'cell:Loc Name,11(Highpoint City)')
        assert_p('Table', 'Text', 'Laverton', 'Loc Addr Ln1,11')
        select('Table', 'cell:Loc Name,14(Bass Hill)')
        assert_p('Table', 'Text', 'Bass Hill', 'Loc Name,14')
        select('Table', 'cell:Loc Name,16(Campbelltown)')
        assert_p(
            'Table', 'Content',
            '[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary\'s, Charles Hackett Drive, St Mary\'s, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive &  Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 0830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]'
        )
    close()
Beispiel #9
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window('Record Editor'):
        click(commonBits.fl('Choose File'))

        if window('Open'):
            select(commonBits.selectPane(), 'Ams_LocDownload_20041228.txt')
            click('Open')
        close()

        click(commonBits.fl('Edit') + '1')
        click('Filter1')
        select('Table1', 'Loc Type', commonBits.fl('Field') + ',0')
        select('Table1', 'st', commonBits.fl('Value') + ',0')
        select('Table1', 'cell:' + commonBits.fl('Field') + ',2(null)')
        commonBits.save1(click)
        #select('FileChooser', commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')

        commonBits.save1(click)
        select_menu(
            commonBits.fl('Window') + '>>Ams_LocDownload_20041228.txt>>' +
            commonBits.fl('Filter Options'))
        commonBits.filter(click)
        select('Table', 'cell:10 - 35|Loc Name,0(Bankstown)')
        assert_p('Table', 'Text', 'Bankstown', '10 - 35|Loc Name,0')
        select('Table', 'cell:8 - 2|Loc Type,1(ST)')
        rightclick('Table', '8 - 2|Loc Type,1')
        select_menu(commonBits.fl('Edit Record'))
        ##		select('Table1', 'cell:8 - 2|Loc Type,1(ST)')
        select('Table',
               'cell:' + commonBits.fl('Data') + ',5(58 Leland Street)')
        assert_p('Table', 'Text', 'Penrith', commonBits.fl('Data') + ',6')
        select('Table',
               'cell:' + commonBits.fl('Data') + ',5(58 Leland Street)')
        assert_p(
            'Table', 'Content',
            '[[Brand Id, 1, 3, TAR, TAR], [Loc Nbr, 4, 4, 5019, 5019], [Loc Type, 8, 2, ST, ST], [Loc Name, 10, 35, Penrith, Penrith], [Loc Addr Ln1, 45, 40, Penrith, Penrith], [Loc Addr Ln2, 85, 40, 58 Leland Street, 58 Leland Street], [Loc Addr Ln3, 125, 35, Penrith, Penrith], [Loc Postcode, 160, 10, 2750, 2750], [Loc State, 170, 3, NSW, NSW], [Loc Actv Ind, 173, 1, A, A]]'
        )
        select('Table',
               'cell:' + commonBits.fl('Data') + ',5(58 Leland Street)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Table', 'cell:8 - 2|Loc Type,1(ST)')
        select('Table', 'cell:8 - 2|Loc Type,1(ST)')
        select_menu(
            commonBits.fl('Window') + '>>Ams_LocDownload_20041228.txt>>' +
            commonBits.fl('Table:'))
        select('Table2', 'cell:8 - 2|Loc Type,1(ST)')
        select_menu(
            commonBits.fl('View') + '>>' +
            commonBits.fl('Execute Saved Filter'))
        ##select('FileChooser', commonBits.userDir() + 'Filter'  + commonBits.fileSep() +'xx1')
        commonBits.selectFileName(
            select, keystroke,
            commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')
        click(commonBits.fl('Run'))
        select('Table', 'cell:10 - 35|Loc Name,2(Blacktown)')
        assert_p('Table', 'Text', 'Blacktown', '10 - 35|Loc Name,2')
        select('Table', 'cell:10 - 35|Loc Name,5(Eastwood)')
        rightclick('Table', '10 - 35|Loc Name,5')
        select_menu(commonBits.fl('Edit Record'))
        ##		select('Table1', 'cell:10 - 35|Loc Name,5(Eastwood)')
        select(
            'Table',
            'cell:' + commonBits.fl('Data') + ',4(Marayong Offsite Reserve)')
        assert_p('Table', 'Text', 'Marayong Offsite Reserve',
                 commonBits.fl('Data') + ',4')
        select(
            'Table',
            'cell:' + commonBits.fl('Data') + ',4(Marayong Offsite Reserve)')
        assert_p(
            'Table', 'Content',
            '[[Brand Id, 1, 3, TAR, TAR], [Loc Nbr, 4, 4, 5052, 5052], [Loc Type, 8, 2, ST, ST], [Loc Name, 10, 35, Eastwood, Eastwood], [Loc Addr Ln1, 45, 40, Marayong Offsite Reserve, Marayong Offsite Reserve], [Loc Addr Ln2, 85, 40, 11 Melissa Place, 11 Melissa Place], [Loc Addr Ln3, 125, 35, Marayong, Marayong], [Loc Postcode, 160, 10, 2148, 2148], [Loc State, 170, 3, NSW, NSW], [Loc Actv Ind, 173, 1, A, A]]'
        )
    close()
Beispiel #10
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window(commonBits.applicationName()):
        select('FileNameTxtFld', commonBits.sampleDir() + 'protoSales.bin')

        click('Edit1')
        select_menu('View>>Sorted Field Tree')
        #select('List', 'sale')
        #select('List', 'sale')
        select('Table', 'cell:Field,0( )')
        #select('List', 'sale')
        select('Table', 'department', 'Field,0')
        select('Table', 'saleDate', 'Field,1')
        select('Table', 'cell:Field,1(date)')
        select('Table1', 'cell:Function,2()')
        select('Table', 'cell:Field,1(date)')
        select('Table1', 'Maximum', 'Function,2')
        select('Table1', 'Maximum', 'Function,3')
        select('Table1', 'Sum', 'Function,4')
        select('Table1', 'Sum', 'Function,5')
        select('Table1', 'cell:Function,5(Sum)')
        click('Save1')
        ##select('FileNameTxtFld', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
        commonBits.selectFileName(
            select,
            commonBits.userDir() + 'SortTree' + commonBits.fileSep() + 'xx2')

        click('Save1')
        select_menu('Window>>protoSales.bin>>Create Sorted Tree')
        click('Build Tree')
        select('JTreeTable', 'cell:saleDate,0(40118)')
        assert_p('JTreeTable', 'Text', '40118', 'saleDate,0')
        select('JTreeTable', 'cell:department,0(60)')
        assert_p('JTreeTable', 'Text', '5', 'quantity,2')
        select('JTreeTable', 'cell:price,0(8740)')
        assert_p('JTreeTable', 'Text', '166940', 'price,1')
        select('JTreeTable', 'cell:price,1(166940)')
        assert_p('JTreeTable', 'Text', '166940', 'price,1')
        select('JTreeTable', 'cell:Tree,1(null)')
        rightclick('JTreeTable', 'Tree,1')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:quantity,2(8)')
        assert_p('JTreeTable', 'Text', '5', 'quantity,3')
        select('JTreeTable', 'cell:Tree,2(null)')
        rightclick('JTreeTable', 'Tree,2')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:price,3(12990)')
        assert_p('JTreeTable', 'Text', '12990', 'price,4')
        select('JTreeTable', 'cell:Tree,14(null)')
        rightclick('JTreeTable', 'Tree,14')
        select_menu('Edit Record')
        select('JTreeTable', 'cell:Tree,14(null)')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select_menu('Window>>protoSales.bin>>Table:')
        select_menu('View>>Execute Sort Tree')
        ##select('FileNameTxtFld', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
        commonBits.selectFileName(
            select,
            commonBits.userDir() + 'SortTree' + commonBits.fileSep() + 'xx2')

        click('Run')
        select('JTreeTable', 'cell:price,1(166940)')
        assert_p('JTreeTable', 'Text', '166940', 'price,1')
        select('JTreeTable', 'cell:price,2(87460)')
        assert_p('JTreeTable', 'Text', '87460', 'price,2')
        select('JTreeTable', 'cell:price,3(-15850)')
        assert_p('JTreeTable', 'Text', '-15850', 'price,3')
        select('JTreeTable', 'cell:price,9(-4000)')
        select('JTreeTable', 'cell:price,7(14090)')
        assert_p('JTreeTable', 'Text', '17730', 'price,8')
    close()
Beispiel #11
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window(commonBits.applicationName()):
        select('FileNameTxtFld', commonBits.sampleDir() + 'protoSales.bin')

        click('Edit1')
        select_menu('View>>Sorted Field Tree')
        #select('List', 'sale')
        #select('List', 'sale')
        select('Table', 'cell:Field,0( )')
        #select('List', 'sale')
        select('Table', 'department', 'Field,0')
        select('Table', 'saleDate', 'Field,1')
        select('Table', 'cell:Field,1(DATE)')
        select('Table1', 'cell:Function,2()')
        select('Table', 'cell:Field,1(DATE)')
        select('Table1', 'Maximum', 'Function,2')
        select('Table1', 'Maximum', 'Function,3')
        select('Table1', 'Sum', 'Function,4')
        select('Table1', 'Sum', 'Function,5')
        select('Table1', 'cell:Function,5(Sum)')
        click('Save1')
        ##select('FileNameTxtFld', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')
        commonBits.selectFileName(
            select,
            commonBits.userDir() + 'SortTree' + commonBits.fileSep() + 'xx1')

        click('Save1')
        select_menu('Window>>protoSales.bin>>Create Sorted Tree')
        click('Build Tree')
        select('JTreeTable', 'cell:saleDate,0(40118)')
        assert_p('JTreeTable', 'Text', '40118', 'saleDate,0')
        select('JTreeTable', 'cell:department,0(60)')
        assert_p('JTreeTable', 'Text', '5', 'quantity,2')
        select('JTreeTable', 'cell:price,0(8740)')
        assert_p('JTreeTable', 'Text', '166940', 'price,1')
        select('JTreeTable', 'cell:price,1(166940)')
        assert_p('JTreeTable', 'Text', '166940', 'price,1')
        select('JTreeTable', 'cell:Tree,1(null)')
        rightclick('JTreeTable', 'Tree,1')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:quantity,2(8)')
        assert_p('JTreeTable', 'Text', '5', 'quantity,3')
        select('JTreeTable', 'cell:Tree,2(null)')
        rightclick('JTreeTable', 'Tree,2')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:price,3(12990)')
        assert_p('JTreeTable', 'Text', '12990', 'price,4')
        select('JTreeTable', 'cell:Tree,14(null)')
        rightclick('JTreeTable', 'Tree,14')
        select_menu('Edit Record')
        select('JTreeTable', 'cell:Tree,14(null)')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select_menu('Window>>protoSales.bin>>Table:')
        select_menu('View>>Execute Sort Tree')
        ##select('FileNameTxtFld', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')
        commonBits.selectFileName(
            select,
            commonBits.userDir() + 'SortTree' + commonBits.fileSep() + 'xx1')

        click('Run Dialog')
        #select('List', 'sale')
        #select('List', 'sale')
        select('Table1', 'cell:Field,1(store)')
        #select('List', 'sale')
        select('Table1', 'cell:Field,1(store)')
        ##		assert_p('Table1', 'Content', '[[keycode, ], [store, ], [DATE, Maximum], [department, Maximum], [quantity, Sum], [price, Sum]]')
        assert_p(
            'Table1', 'Content',
            '[[keycode, ], [store, ], [department, Maximum], [saleDate, Maximum], [quantity, Sum], [price, Sum]]'
        )

        ##[[keycode, ], [store, ], [DATE, Maximum], [department, Maximum], [quantity, Sum], [price, Sum]]')
        select('Table1', 'cell:Field,1(store)')
        select('Table', 'cell:Ascending,0(true)')
        select('Table1', 'cell:Field,1(store)')
        select('Table', 'cell:Ascending,0(false)')
        select('Table1', 'cell:Field,1(store)')
        assert_p(
            'Table', 'Content',
            '[[department, true], [saleDate, true], [ , true], [ , true], [ , true]]'
        )
        select('Table1', 'cell:Field,1(store)')
        click('Build Tree')
        select('JTreeTable', 'cell:price,1(166940)')
        assert_p('JTreeTable', 'Text', '166940', 'price,1')
        select('JTreeTable', 'cell:price,5(150.26)')
        assert_p('JTreeTable', 'Text', '150260', 'price,5')
    close()
def test():
    from Modules import commonBits

    java_recorded_version = "1.6.0_03"

    if window("Protocol Buffer Editor"):
        select("FileChooser", commonBits.sampleDir() + "protoSales.bin")

        click("Edit1")
        select_menu("View>>Sorted Field Tree")
        # select('List', 'sale')
        # select('List', 'sale')
        select("Table", "cell:Field,0( )")
        # select('List', 'sale')
        select("Table", "department", "Field,0")
        select("Table", "saleDate", "Field,1")
        select("Table", "cell:Field,1(date)")
        select("Table1", "cell:Function,2()")
        select("Table", "cell:Field,1(date)")
        select("Table1", "Maximum", "Function,2")
        select("Table1", "Maximum", "Function,3")
        select("Table1", "Sum", "Function,4")
        select("Table1", "Sum", "Function,5")
        select("Table1", "cell:Function,5(Sum)")
        click("Save1")
        ##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
        commonBits.selectFileName(select, commonBits.userDir() + "SortTree" + commonBits.fileSep() + "xx2")

        click("Save1")
        select_menu("Window>>protoSales.bin>>Create Sorted Tree")
        click("Build Tree")
        select("JTreeTable", "cell:saleDate,0(40118)")
        assert_p("JTreeTable", "Text", "40118", "saleDate,0")
        select("JTreeTable", "cell:department,0(60)")
        assert_p("JTreeTable", "Text", "5", "quantity,2")
        select("JTreeTable", "cell:price,0(8740)")
        assert_p("JTreeTable", "Text", "166940", "price,1")
        select("JTreeTable", "cell:price,1(166940)")
        assert_p("JTreeTable", "Text", "166940", "price,1")
        select("JTreeTable", "cell:Tree,1(null)")
        rightclick("JTreeTable", "Tree,1")
        select_menu("Expand Tree")
        select("JTreeTable", "cell:quantity,2(8)")
        assert_p("JTreeTable", "Text", "5", "quantity,3")
        select("JTreeTable", "cell:Tree,2(null)")
        rightclick("JTreeTable", "Tree,2")
        select_menu("Expand Tree")
        select("JTreeTable", "cell:price,3(12990)")
        assert_p("JTreeTable", "Text", "12990", "price,4")
        select("JTreeTable", "cell:Tree,14(null)")
        rightclick("JTreeTable", "Tree,14")
        select_menu("Edit Record")
        select("JTreeTable", "cell:Tree,14(null)")
        click("BasicInternalFrameTitlePane$NoFocusButton2")
        select_menu("Window>>protoSales.bin>>Table:")
        select_menu("View>>Execute Sort Tree")
        ##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
        commonBits.selectFileName(select, commonBits.userDir() + "SortTree" + commonBits.fileSep() + "xx2")

        click("Run")
        select("JTreeTable", "cell:price,1(166940)")
        assert_p("JTreeTable", "Text", "166940", "price,1")
        select("JTreeTable", "cell:price,2(87460)")
        assert_p("JTreeTable", "Text", "87460", "price,2")
        select("JTreeTable", "cell:price,3(-15850)")
        assert_p("JTreeTable", "Text", "-15850", "price,3")
        select("JTreeTable", "cell:price,9(-4000)")
        select("JTreeTable", "cell:price,7(14090)")
        assert_p("JTreeTable", "Text", "17730", "price,8")
    close()
def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_03'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'protoSales.bin')

		click('Edit1')
		select_menu('View>>Sorted Field Tree')
		#select('List', 'sale')
		#select('List', 'sale')
		select('Table', 'cell:Field,0( )')
		#select('List', 'sale')
		select('Table', 'department', 'Field,0')
		select('Table', 'saleDate', 'Field,1')
		select('Table', 'cell:Field,1(DATE)')
		select('Table1', 'cell:Function,2()')
		select('Table', 'cell:Field,1(DATE)')
		select('Table1', 'Maximum', 'Function,2')
		select('Table1', 'Maximum', 'Function,3')
		select('Table1', 'Sum', 'Function,4')
		select('Table1', 'Sum', 'Function,5')
		select('Table1', 'cell:Function,5(Sum)')
		click('Save1')
		##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')
		commonBits.selectFileName(select, commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')

		click('Save1')
		select_menu('Window>>protoSales.bin>>Create Sorted Tree')
		click('Build Tree')
		select('JTreeTable', 'cell:saleDate,0(40118)')
		assert_p('JTreeTable', 'Text', '40118', 'saleDate,0')
		select('JTreeTable', 'cell:department,0(60)')
		assert_p('JTreeTable', 'Text', '5', 'quantity,2')
		select('JTreeTable', 'cell:price,0(8740)')
		assert_p('JTreeTable', 'Text', '166940', 'price,1')
		select('JTreeTable', 'cell:price,1(166940)')
		assert_p('JTreeTable', 'Text', '166940', 'price,1')
		select('JTreeTable', 'cell:Tree,1(null)')
		rightclick('JTreeTable', 'Tree,1')
		select_menu('Expand Tree')
		select('JTreeTable', 'cell:quantity,2(8)')
		assert_p('JTreeTable', 'Text', '5', 'quantity,3')
		select('JTreeTable', 'cell:Tree,2(null)')
		rightclick('JTreeTable', 'Tree,2')
		select_menu('Expand Tree')
		select('JTreeTable', 'cell:price,3(12990)')
		assert_p('JTreeTable', 'Text', '12990', 'price,4')
		select('JTreeTable', 'cell:Tree,14(null)')
		rightclick('JTreeTable', 'Tree,14')
		select_menu('Edit Record')
		select('JTreeTable', 'cell:Tree,14(null)')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select_menu('Window>>protoSales.bin>>Table:')
		select_menu('View>>Execute Sort Tree')
		##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')
		commonBits.selectFileName(select, commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx1')

		click('Run Dialog')
		#select('List', 'sale')
		#select('List', 'sale')
		select('Table1', 'cell:Field,1(store)')
		#select('List', 'sale')
		select('Table1', 'cell:Field,1(store)')
##		assert_p('Table1', 'Content', '[[keycode, ], [store, ], [DATE, Maximum], [department, Maximum], [quantity, Sum], [price, Sum]]')
		assert_p('Table1', 'Content', '[[keycode, ], [store, ], [department, Maximum], [saleDate, Maximum], [quantity, Sum], [price, Sum]]')

##[[keycode, ], [store, ], [DATE, Maximum], [department, Maximum], [quantity, Sum], [price, Sum]]')
		select('Table1', 'cell:Field,1(store)')
		select('Table', 'cell:Ascending,0(true)')
		select('Table1', 'cell:Field,1(store)')
		select('Table', 'cell:Ascending,0(false)')
		select('Table1', 'cell:Field,1(store)')
		assert_p('Table', 'Content', '[[department, true], [saleDate, true], [ , true], [ , true], [ , true]]')
		select('Table1', 'cell:Field,1(store)')
		click('Build Tree')
		select('JTreeTable', 'cell:price,1(166940)')
		assert_p('JTreeTable', 'Text', '166940', 'price,1')
		select('JTreeTable', 'cell:price,5(150.26)')
		assert_p('JTreeTable', 'Text', '150260', 'price,5')
	close()
Beispiel #14
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'AmsLocationTest1.xml')
        commonBits.doEdit(click)

        select('JTreeTable', 'cell:Xml~Text,4(null)')
        rightclick('JTreeTable', 'Xml~Text,4')
        select_menu('Expand Tree')
        select('LayoutCombo', 'item')
        select('JTreeTable', 'rows:[5,6],columns:[Xml~Namespace]')
        click('Delete1')
        select('JTreeTable', 'cell:name,4(Ams-Vendor)')
        assert_p('JTreeTable', 'Text', 'Ams-Vendor', 'name,4')
        select('JTreeTable', 'cell:name,5(Full-Address)')

        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )

        select('JTreeTable', 'rows:[3,4,5],columns:[Xml~Prefix]')
        select_menu('View>>Table View #{Selected Records#}')
        select('JTreeTable', 'rows:[3,4,5],columns:[Xml~Prefix]')
        select('Table', 'cell:7|name,1(Ams-Vendor)')
        assert_p('Table', 'Text', 'Ams-Vendor', '7|name,1')
        select('Table', 'cell:7|name,2(Full-Address)')

        assert_p(
            'Table', 'Content',
            '[[XML Comment, ******************************, , , , , , , , , , ], [item, , , 173, 01, Ams-Vendor, 1, 173, , , , ], [item, , , 128, 03, Full-Address, 45, 128, , , , ], [item, , , 115, 05, Address-Lines, 45, 115, , , , ], [item, , , 40, 07, Address-1, 45, 40, X(40), , True, ], [item, , , 40, 07, Address-2, 85, 40, X(40), , True, ], [item, , , 35, 07, Address-3, 125, 35, X(35), , True, ], [/item, , , , , , , , , , , ], [item, , , 10, 05, Postcode, 160, 10, 9(10), true, True, ], [item, , , 3, 05, State, 170, 3, XXX, , True, ], [/item, , , , , , , , , , , ]]'
        )

        select('Table', 'cell:7|name,3(Address-Lines)')
        assert_p('Table', 'RowCount', '11')
        select('Table', 'cell:7|name,3(Address-Lines)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('JTreeTable', 'cell:Xml~Prefix,2(* Location Download)')
        click('Delete1')
        select('JTreeTable',
               'cell:Xml~Prefix,1(******************************)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ]]'
        )
        select('JTreeTable',
               'cell:Xml~Prefix,2(******************************)')
        assert_p('JTreeTable', 'Text',
                 'cell:Xml~Prefix,2(******************************)')
        select('JTreeTable',
               'cell:Xml~Prefix,2(******************************)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')

        if window('Save Changes to file: ' + commonBits.sampleDir() + 'Xml' +
                  commonBits.fileSep() + 'AmsLocationTest1.xml'):
            click('No')
        close()
    close()
Beispiel #15
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_17'

    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'IVM0034_Map.XML')

        commonBits.doEdit(click)
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',1')
        select_menu(commonBits.fl('Expand Tree'))  ##		select('JTreeTable', '')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',4')
        select_menu(commonBits.fl('Edit Record'))
        click('Right')
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 2, 2], [Col, 6, , 15, 15], [LENGTH, 7, , 47, 47], [INITIAL, 8, , Basic Stock Contract - Header Enquiry Selection, Basic Stock Contract - Header Enquiry Selection], [ATTRB, 9, , (ASKIP,BRT), (ASKIP,BRT)], [id, 10, , , ], [Type, 11, , , ], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',21')
        select_menu(commonBits.fl('Edit Record'))
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 6, 6], [Col, 6, , 8, 8], [LENGTH, 7, , 8, 8], [INITIAL, 8, , , ], [ATTRB, 9, , (ASKIP,NORM), (ASKIP,NORM)], [id, 10, , CONTNO1, CONTNO1], [Type, 11, , Fld, Fld], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        select_menu(
            commonBits.fl('Edit') + '>>' + commonBits.fl('Show / Hide Fields'))
        ##click('MetalInternalFrameTitlePane', 181, 17)
        select('Table', 'cell:' + commonBits.fl('Show') + ',4(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',5(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',6(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',7(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',8(true)')
        click(commonBits.fl('Go'))

        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 6, 6], [Type, 11, , Fld, Fld], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        select_menu(
            commonBits.fl('Edit') + '>>' + commonBits.fl('Show / Hide Fields'))
        assert_p(
            'Table', 'Content',
            '[[Xml~Name, true], [Xml~Prefix, true], [Xml~Namespace, true], [Row, true], [Col, false], [LENGTH, false], [INITIAL, false], [ATTRB, false], [id, false], [Type, true], [Xml~End, true], [Following~Text, true]]'
        )
        select('Table', 'cell:' + commonBits.fl('Show') + ',5(false)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',6(false)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',7(false)')
        click(commonBits.fl('Go'))
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 6, 6], [LENGTH, 7, , 8, 8], [INITIAL, 8, , , ], [ATTRB, 9, , (ASKIP,NORM), (ASKIP,NORM)], [Type, 11, , Fld, Fld], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        ##		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',6')
        select_menu(commonBits.fl('Show Field Fields') + '>>Col')
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 6, 6], [Col, 6, , 8, 8], [LENGTH, 7, , 8, 8], [INITIAL, 8, , , ], [ATTRB, 9, , (ASKIP,NORM), (ASKIP,NORM)], [Type, 11, , Fld, Fld], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        ##		select('Table', '')
        rightclick('Table', commonBits.fl('Data') + ',5')
        select_menu(commonBits.fl('Show Field Fields') + '>>id')
        assert_p(
            'Table', 'Content',
            '''[[Xml~Name, 0, , Field, Field], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Row, 5, , 6, 6], [Col, 6, , 8, 8], [LENGTH, 7, , 8, 8], [INITIAL, 8, , , ], [ATTRB, 9, , (ASKIP,NORM), (ASKIP,NORM)], [id, 10, , CONTNO1, CONTNO1], [Type, 11, , Fld, Fld], [Xml~End, 1, , True, True], [Following~Text, 2, , 
, 
]]''')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
##commonBits.closeWindow(click)
##click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Beispiel #16
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Editor'):
        ##		click(commonBits.fl('Choose File'))

        ##		if window('Open'):
        ##			select(commonBits.selectPane(), 'Xml')
        ##			doubleclick(commonBits.selectPane(), '0')
        ##			select(commonBits.selectPane(), 'SAR4180B.xml')
        ##			click('Open')
        ##		close()

        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'SAR4180Ba.xml')

        commonBits.doEdit(click)

        select('LayoutCombo', 'XML Start_Document')
        select('JTreeTable', 'cell:Xml~Standalone,1(SAR4180B.txt)')
        select('JTreeTable', 'cell:Xml~Version,1(null)')
        rightclick('JTreeTable', 'Xml~Version,1')
        select_menu(commonBits.fl('Expand Tree'))
        select(
            'JTreeTable',
            'cell:Xml~Encoding,7(*****************************************************************)'
        )
        select(
            'JTreeTable',
            'cell:Xml~Encoding,3(* MEMBER IN COPYBOOK LIBRARY PT99.BASE0.COP   NOTE: ID = DTK    *)'
        )
        assert_p(
            'JTreeTable', 'Text',
            '* CREATED 20/12/94  S GHARIOS.                                  *',
            'Xml~Encoding,5')
        select(
            'JTreeTable',
            'cell:Xml~Encoding,11(* V02     |22/06/2K|SMS-PROJECT: COMMENTED  THE FILLER| VIJAY   *)'
        )
        assert_p('JTreeTable', 'RowCount', '17')
        select('JTreeTable', 'cell:Xml~Encoding,16(null)')
        rightclick('JTreeTable', 'Xml~Encoding,16')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:Xml~Encoding,18(null)')
        select('JTreeTable', 'cell:Xml~Encoding,17(null)')
        select('JTreeTable', 'cell:Xml~Encoding,17()')
        assert_p('JTreeTable', 'RowCount', '21')
        select('JTreeTable', 'cell:Xml~Encoding,17()')
        select('LayoutCombo', 'item')
        select('JTreeTable', 'cell:Xml~Prefix,17()')
        select('JTreeTable', 'cell:Xml~Prefix,17()')
        rightclick('JTreeTable', 'Xml~Prefix,16')
        select('JTreeTable', 'cell:Xml~Prefix,17(null)')
        rightclick('JTreeTable', 'Xml~Prefix,17')
        select_menu(commonBits.fl('Edit Record'))
        select('JTreeTable', 'cell:Xml~Prefix,16(null)')
        select(
            'Table',
            'cell:' + commonBits.fl('Data') + ',4(R4180B-KEYCODE-DETAIL-ID)')
        select(
            'Table',
            'cell:' + commonBits.fl('Text') + ',4(R4180B-KEYCODE-DETAIL-ID)')
        assert_p('Table', 'Text', 'R4180B-KEYCODE-DETAIL-ID',
                 commonBits.fl('Text') + ',4')
        select('Table', 'cell:' + commonBits.fl('Data') + ',7(X(03))')
        assert_p('Table', 'RowCount', '11')
        click('Right')
        select('Table', 'cell:' + commonBits.fl('Data') + ',4(R4180B-KEYCODE)')
        assert_p('Table', 'Text', 'R4180B-KEYCODE',
                 commonBits.fl('Data') + ',4')
        select('Table', 'cell:' + commonBits.fl('Text') + ',4(R4180B-KEYCODE)')
        select('Table', 'cell:' + commonBits.fl('Text') + ',4(R4180B-KEYCODE)')
        click('Right')
        select('Table', 'cell:' + commonBits.fl('Data') + ',4(R4180B-APN)')
        assert_p('Table', 'Text', 'R4180B-APN', commonBits.fl('Data') + ',4')
        select('Table', 'cell:' + commonBits.fl('Text') + ',4(R4180B-APN)')
        select('Table', 'cell:' + commonBits.fl('Text') + ',4(R4180B-APN)')
        click('Right')
        select('Table',
               'cell:' + commonBits.fl('Data') + ',4(R4180B-UNIT-TYPE)')
    close()
Beispiel #17
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_03'

	if window('Record Editor'):
		select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin')

		click(commonBits.fl('Edit') + '1')
		select_menu(commonBits.fl('View') + '>>' + commonBits.fl('Sorted Field Tree'))
#		select('List', 'DTAR020')
#		select('List', 'DTAR020')
		select('Table', 'cell:' + commonBits.fl('Field') + ',0( )')
#		select('List', 'DTAR020')
		select('Table', 'DEPT-NO', commonBits.fl('Field') + ',0')
		select('Table', 'DATE', commonBits.fl('Field') + ',1')
		select('Table', 'cell:' + commonBits.fl('Field') + ',1(DATE)')
		select('Table1', 'cell:' + commonBits.fl('Function') + ',2()')
		select('Table', 'cell:' + commonBits.fl('Field') + ',1(DATE)')
		select('Table1', commonBits.fl('Maximum'), commonBits.fl('Function') + ',2')
		select('Table1', commonBits.fl('Maximum'), commonBits.fl('Function') + ',3')
		select('Table1', commonBits.fl('Sum'), commonBits.fl('Function') + ',4')
		select('Table1', commonBits.fl('Sum'), commonBits.fl('Function') + ',5')
		select('Table1', 'cell:' + commonBits.fl('Function') + ',5(Sum)')
		##commonBits.save1(click)
		commonBits.save(click)

		##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
		commonBits.selectFileName(select, keystroke, commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
		commonBits.save1(click)
		select_menu(commonBits.fl('Window') + '>>DTAR020.bin>>' + commonBits.fl('Create Sorted Tree'))
		click(commonBits.fl('Build Tree'))
		select('JTreeTable', 'cell:DATE,0(40118)')
		assert_p('JTreeTable', 'Text', '40118', 'DATE,0')
		select('JTreeTable', 'cell:DEPT-NO,0(60)')
		assert_p('JTreeTable', 'Text', '5', 'QTY-SOLD,2')
		select('JTreeTable', 'cell:SALE-PRICE,0(8.74)')
		assert_p('JTreeTable', 'Text', '166.94', 'SALE-PRICE,1')
		select('JTreeTable', 'cell:SALE-PRICE,1(166.94)')
		assert_p('JTreeTable', 'Text', '166.94', 'SALE-PRICE,1')
		select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',1(null)')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',1')
		select_menu(commonBits.fl('Expand Tree'))
		select('JTreeTable', 'cell:QTY-SOLD,2(8)')
		assert_p('JTreeTable', 'Text', '5', 'QTY-SOLD,3')
		select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',2(null)')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',2')
		select_menu(commonBits.fl('Expand Tree'))
		select('JTreeTable', 'cell:SALE-PRICE,3(12.99)')
		assert_p('JTreeTable', 'Text', '12.99', 'SALE-PRICE,4')
		select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',14(null)')
		rightclick('JTreeTable', commonBits.fl('Tree') + ',14')
		select_menu(commonBits.fl('Edit Record'))
		select('JTreeTable', 'cell:' + commonBits.fl('Tree') + ',14(null)')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')
		select_menu(commonBits.fl('Window') + '>>DTAR020.bin>>' + commonBits.fl('Table:'))
		select_menu(commonBits.fl('View') + '>>' + commonBits.fl('Execute Sort Tree'))
		##select('FileChooser', commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
		commonBits.selectFileName(select, keystroke, commonBits.userDir() +  'SortTree'  + commonBits.fileSep() + 'xx2')
		click(commonBits.fl('Run')
)
		select('JTreeTable', 'cell:SALE-PRICE,1(166.94)')
		assert_p('JTreeTable', 'Text', '166.94', 'SALE-PRICE,1')
		select('JTreeTable', 'cell:SALE-PRICE,2(87.46)')
		assert_p('JTreeTable', 'Text', '87.46', 'SALE-PRICE,2')
		select('JTreeTable', 'cell:SALE-PRICE,3(-15.85)')
		assert_p('JTreeTable', 'Text', '-15.85', 'SALE-PRICE,3')
		select('JTreeTable', 'cell:SALE-PRICE,9(-4.00)')
		select('JTreeTable', 'cell:SALE-PRICE,7(14.09)')
		assert_p('JTreeTable', 'Text', '17.73', 'SALE-PRICE,8')
	close()
Beispiel #18
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_03'

    if window(commonBits.applicationName()):
        click('FileSearch')
        if window('Open'):
            select(commonBits.selectPane(), 'Ams_LocDownload_20041228.bin')
            click('Open')
        close()

        click('Edit1')
        click('Filter1')
        select('Table1', 'Loc_Type', 'Field,0')
        select('Table1', 'st', 'Value,0')
        select('Table1', 'cell:Field,2(null)')
        click('Save1')
        ##select('FileNameTxtFld', commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')
        commonBits.selectFileName(
            select,
            commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')
        click('Save1')
        select_menu('Window>>Ams_LocDownload_20041228.bin>>Filter Options')
        click('Filter1')
        select('LinesTbl', 'cell:4|Loc_Name,0(Bankstown)')
        assert_p('LinesTbl', 'Text', 'Bankstown', '4|Loc_Name,0')
        select('LinesTbl', 'cell:3|Loc_Type,1(ST)')
        rightclick('LinesTbl', '3|Loc_Type,1')
        select_menu('Edit Record')
        ##		select('Table1', 'cell:3|Loc_Type,1(ST)')
        select('BaseLineAsColumn$LineAsColTbl',
               'cell:Data,5(58 Leland Street)')
        assert_p('BaseLineAsColumn$LineAsColTbl', 'Text', 'Penrith', 'Data,6')
        select('BaseLineAsColumn$LineAsColTbl',
               'cell:Data,5(58 Leland Street)')
        assert_p(
            'BaseLineAsColumn$LineAsColTbl', 'Content',
            '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5019, 5019], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Penrith, Penrith], [Loc_Addr_Ln1, 5, , Penrith, Penrith], [Loc_Addr_Ln2, 6, , 58 Leland Street, 58 Leland Street], [Loc_Addr_Ln3, 7, , Penrith, Penrith], [Loc_Postcode, 8, , 2750, 2750], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]'
        )
        select('BaseLineAsColumn$LineAsColTbl',
               'cell:Data,5(58 Leland Street)')
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('LinesTbl', 'cell:3|Loc_Type,1(ST)')
        select('LinesTbl', 'cell:3|Loc_Type,1(ST)')
        select_menu('Window>>Ams_LocDownload_20041228.bin>>Table:')

        select('LinesTbl', 'cell:3|Loc_Type,1(ST)')
        select_menu('View>>Execute Saved Filter')
        #select('FileNameTxtFld', commonBits.userDir() + 'Filter'  + commonBits.fileSep() +'xx1')
        commonBits.selectFileName(
            select,
            commonBits.userDir() + 'Filter' + commonBits.fileSep() + 'xx1')

        click('Run')
        select('LinesTbl', 'cell:4|Loc_Name,2(Blacktown)')
        assert_p('LinesTbl', 'Text', 'Blacktown', '4|Loc_Name,2')
        select('LinesTbl', 'cell:4|Loc_Name,5(Eastwood)')
        rightclick('LinesTbl', '4|Loc_Name,5')
        select_menu('Edit Record')
        ##		select('Table1', 'cell:4|Loc_Name,5(Eastwood)')
        select('BaseLineAsColumn$LineAsColTbl',
               'cell:Data,4(Marayong Offsite Reserve)')
        assert_p('BaseLineAsColumn$LineAsColTbl', 'Text',
                 'Marayong Offsite Reserve', 'Data,4')
        select('BaseLineAsColumn$LineAsColTbl',
               'cell:Data,4(Marayong Offsite Reserve)')
        assert_p(
            'BaseLineAsColumn$LineAsColTbl', 'Content',
            '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5052, 5052], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Eastwood, Eastwood], [Loc_Addr_Ln1, 5, , Marayong Offsite Reserve, Marayong Offsite Reserve], [Loc_Addr_Ln2, 6, , 11 Melissa Place, 11 Melissa Place], [Loc_Addr_Ln3, 7, , Marayong, Marayong], [Loc_Postcode, 8, , 2148, 2148], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]'
        )
    close()
Beispiel #19
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'AmsLocationTest1.xml')
        commonBits.doEdit(click)

        select('LayoutCombo', 'copybook')
        #rightclick('JTreeTable', 'Prefix,0')
        #select_menu('Expand Tree')
        rightclick('JTreeTable', 'Xml~Prefix,4')
        select_menu('Expand Tree')
        select('JTreeTable', 'rows:[4,5,6,7,8],columns:[Xml~Prefix]')
        select('LayoutCombo', 'item')
        select('JTreeTable',
               'cell:Xml~Prefix,3(******************************)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('JTreeTable', 'rows:[4,5,6,7,8],columns:[Xml~Prefix]')
        select_menu('View>>Table View #{Selected Records#}')
        #		select('JTreeTable', 'rows:[4,5,6,7,8],columns:[Prefix]')
        select('Table', 'cell:7|name,2(Location-Details)')
        assert_p('Table', 'Text', 'Location-Details', '7|name,2')
        select('Table', 'cell:7|name,3(Location-Number)')
        assert_p('Table', 'RowCount', '17')
        select('Table', 'cell:7|name,4(Location-Type)')
        assert_p('Table', 'Text', 'Location-Name', '7|name,5')
        select('Table', 'cell:7|name,5(Location-Name)')
        assert_p('Table', 'Enabled', 'true')
        select('Table', 'cell:7|name,7(Full-Address)')
        assert_p(
            'Table', 'Content',
            '[[item, , , 173, 01, Ams-Vendor, 1, 173, , , , ], [item, , , 3, 03, Brand, 1, 3, x(3), , True, ], [item, , , 41, 03, Location-Details, 4, 41, , , , ], [item, , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [item, , , 2, 05, Location-Type, 8, 2, XX, , True, ], [item, , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [/item, , , , , , , , , , , ], [item, , , 128, 03, Full-Address, 45, 128, , , , ], [item, , , 115, 05, Address-Lines, 45, 115, , , , ], [item, , , 40, 07, Address-1, 45, 40, X(40), , True, ], [item, , , 40, 07, Address-2, 85, 40, X(40), , True, ], [item, , , 35, 07, Address-3, 125, 35, X(35), , True, ], [/item, , , , , , , , , , , ], [item, , , 10, 05, Postcode, 160, 10, 9(10), true, True, ], [item, , , 3, 05, State, 170, 3, XXX, , True, ], [/item, , , , , , , , , , , ], [item, , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('Table', 'cell:7|name,7(Full-Address)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('JTreeTable', 'cell:Tree,6(null)')
        rightclick('JTreeTable', 'Xml~Prefix,6')
        select_menu('Copy Record#{s#}')
        select('JTreeTable', 'cell:Xml~Prefix,8(null)')
        rightclick('JTreeTable', 'Xml~Prefix,8')
        select_menu('Paste Record#{s#}')
        rightclick('JTreeTable', 'Xml~Prefix,0')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:Xml~Prefix,4(null)')
        rightclick('JTreeTable', 'Xml~Prefix,4')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:name,9(Location-Details)')
        assert_p('JTreeTable', 'Text', 'Location-Details', 'name,9')
        select('JTreeTable', 'cell:name,8(Location-Active)')
        assert_p('JTreeTable', 'RowCount', '10')
        select('JTreeTable', 'cell:Xml~Prefix,9(null)')
        rightclick('JTreeTable', 'Xml~Prefix,9')
        select_menu('Expand Tree')
        select('JTreeTable', 'cell:name,11(Location-Type)')
        assert_p('JTreeTable', 'Text', 'Location-Type', 'name,11')
        select('JTreeTable', 'cell:name,12(Location-Name)')
        assert_p('JTreeTable', 'Text', 'Location-Name', 'name,12')
        select('JTreeTable', 'cell:name,10(Location-Number)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ]]'
        )
        select('JTreeTable', 'cell:name,11(Location-Type)')
        assert_p('JTreeTable', 'RowCount', '13')
        select('JTreeTable', 'rows:[8,9,10,11,12],columns:[display-length]')
        select_menu('View>>Table View #{Selected Records#}')
        select('JTreeTable', 'rows:[8,9,10,11,12],columns:[display-length]')
        select('Table', 'cell:5|display-length,1(41)')
        assert_p(
            'Table', 'Content',
            '[[item, , , 1, 03, Location-Active, 173, 1, X, , True, ], [item, , , 41, 03, Location-Details, 4, 41, , , , ], [item, , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [item, , , 2, 05, Location-Type, 8, 2, XX, , True, ], [item, , , 35, 05, Location-Name, 10, 35, X(35), , True, ]]'
        )
        select('Table', 'cell:7|name,3(Location-Type)')
        assert_p('Table', 'Text', 'Location-Type', '7|name,3')
        select('Table', 'cell:7|name,0(Location-Active)')
        assert_p('Table', 'Text', 'Location-Active', '7|name,0')
        select('Table', 'cell:7|name,2(Location-Number)')
        assert_p('Table', 'RowCount', '5')
        select('Table', 'cell:7|name,2(Location-Number)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('JTreeTable', 'cell:level,11(05)')
        rightclick('JTreeTable', 'level,11')
        select('JTreeTable', 'cell:level,11(05)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')

        if window('Save Changes to file: ' + commonBits.sampleDir() + 'Xml' +
                  commonBits.fileSep() + 'AmsLocationTest1.xml'):
            click('No')
        close()
    close()
def test():
    from Modules import commonBits

    java_recorded_version = "1.6.0_03"

    if window("Protocol Buffer Editor"):
        select_menu("Utilities>>Compare Menu")
        click("*1")
        click("Choose File")

        if window("Open"):
            select(commonBits.selectPaneFn(), "Ams_LocDownload_20041228_Extract.bin")
            click("Open")
        close()

        click("Choose File1")

        if window("Open"):
            select(commonBits.selectPaneFn(), "Ams_LocDownload_20041228_Extract2.bin")
            click("Open")
        close()

        # commonBits.setRecordLayout2(select, 'ams Store')

        click("Right")
        select("TabbedPane", "")
        click("Right")
        select("TabbedPane", "")
        click("Choose File")

        if window("Save"):
            ##			select(commonBits.selectPane(), 'Compare')
            ##			doubleclick(commonBits.selectPane(), '0')
            if commonBits.isWindowsLook():
                select(commonBits.selectPane(), "zzTest_asmLocation.Xml")
            else:
                select("File Name", "zzTest_asmLocation.Xml")
            click("Save")
        close()

        click("Save1")
        assert_p("TextField", "Text", "")
        assert_p("TextArea", "Text", "")
        click("Compare")
        select("Table", "cell:Loc_Name,3(VIC West Ad Support)")
        assert_p("Table", "Text", "VIC West Ad Support", "Loc_Name,3")
        select("Table", "cell:Loc_Name,6(Miranda)")
        assert_p("Table", "Text", "Miranda", "Loc_Name,6")
        select("Table", "cell:Loc_Name,7(Ringwood)")
        assert_p(
            "Table",
            "Content",
            "[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary's, Charles Hackett Drive, St Mary's, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive &  Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]",
        )
        select("Table", "cell:Loc_Name,7(Ringwood)")
        click("BasicInternalFrameTitlePane$NoFocusButton2")
        click("BasicInternalFrameTitlePane$NoFocusButton2")
        click("*")
        select("FileChooser", commonBits.userDir() + "Compare" + commonBits.fileSep() + "zzTest_asmLocation.Xml")
        click("Run Compare")
        select("Table", "cell:Loc_Name,11(Highpoint City)")
        assert_p("Table", "Text", "Laverton", "Loc_Addr_Ln1,11")
        select("Table", "cell:Loc_Name,14(Bass Hill)")
        assert_p("Table", "Text", "Bass Hill", "Loc_Name,14")
        select("Table", "cell:Loc_Name,16(Campbelltown)")
        assert_p(
            "Table",
            "Content",
            "[[, , , , , , , , , , , , ], [, Inserted, 1, TAR, 5839, DC, DC - Taras Ave, , 30-68 Taras Ave, Altona North, 3025, VIC, A], [, , , , , , , , , , , , ], [, Inserted, 2, TAR, 5850, DC, VIC West Ad Support, , Lot 2 Little Boundary Rd, Laverton, 3028, VIC, A], [, Old, 4, TAR, 5035, ST, Rockdale, Building B,  Portside DC, 2-8 Mc Pherson Street, Botany, 2019, NSW, A], [, New, 6, , 5096, , Canberra Civic, Target Canberra, Canberra City Centre, Akuna Ave, Canberra, 2601, ACT, ], [, Old, 5, TAR, 5037, ST, Miranda, Westfield Shoppingtown, Cnr. Urunga Pde & The Kingsway, Miranda, 2228, NSW, A], [, New, 7, , 5012, , Ringwood, Ringwood, Seymour Street, Ringwood, 3134, VIC, ], [, Old, 6, TAR, 5052, ST, Eastwood, Marayong Offsite Reserve, 11 Melissa Place, Marayong, 2148, NSW, A], [, New, 8, , 5030, , Epping, Epping Plaza Shopping Centre, Cnr. High & Cooper Streets, Epping, 3076, VIC, ], [, Old, 7, TAR, 5055, ST, Leichhardt, Marketown, Marion Street, Leichhardt, 2040, NSW, A], [, New, 9, , 5054, , Highpoint City, Laverton, Lot 2, Cnr Lt Boundry & Old Geelong Road, Laverton, 3028, VIC, ], [, Old, 8, TAR, 5060, ST, St Marys, St. Mary's, Charles Hackett Drive, St Mary's, 2760, NSW, A], [, New, 10, , 5062, , Castletown, Townsville, Cnr. Woolcock St. & Kings Road, Townsville, 4810, QLD, ], [, Old, 9, TAR, 5070, ST, Bass Hill, Bass Hill Plaza, 753 Hume Highway, Bass Hill, 2197, NSW, A], [, New, 11, , 5138, , Cairns Central, Cairns, Cnr. McLeod & Aplin Streets, Cairns, 4870, QLD, ], [, Old, 10, TAR, 5074, ST, Campbelltown, Campbelltown Mall, 303 Queen Street, Campbelltown, 2560, NSW, A], [, New, 12, , 5141, , The Willows, Thuringowa Central, Cnr Thuringowa Drive &  Range Rd, Thuringowa Central, 4817, QLD, ], [, Old, 11, TAR, 5078, ST, Warringah Mall, Frenchs Forest, Units 2-3, 14 Aquatic Drive, Frenchs Forest, 2086, NSW, A], [, New, 13, , 5146, , Palmerston, Palmerston Shopping Centre, Temple Terrace, Palmerston, 830, NT, ], [, Old, 12, TAR, 5081, ST, Ashfield, Ashfield Mall, Knox Street, Ashfield, 2131, NSW, A], [, New, 14, , 5002, , Coffs Harbour, Coffs Harbour, Cnr. Park Beach Road & Pacific Hwy, Coffs Harbour, 2450, , ], [, Old, 13, TAR, 5085, ST, Roselands, Condell park, Unit 2, 39-41 Allingham Street, Condell Park, 2200, NSW, A], [, New, 15, , 5966, DC, Huntingwood DC, Huntingwood DC, 35 Huntingwood Drive, Huntingwood, 2148, , ], [, , , , , , , , , , , , ], [, Inserted, 16, TAR, 5967, DC, Hendra DC, Hendra DC, Cnr Headly Ave & Nudgee Road, Hendra, 4011, QLD, A], [, , , , , , , , , , , , ], [, Inserted, 17, TAR, 5968, DC, Beverly DC, Beverly DC, 117 Main Street, Beverly, 5009, SA, A]]",
        )
    close()
Beispiel #21
0
def test():
    from Modules import commonBits

    java_recorded_version = '1.6.0_10'

    if window('Record Editor'):
        commonBits.selectOldFilemenu(select_menu, 'Utilities',
                                     'File Copy Menu')
        click('*3')
        select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin')
        select('FileChooser1', commonBits.sampleDir() + 'XfeDTAR020.csv')
        commonBits.setRecordLayout2(select, 'DTAR020')

        ##		click('ScrollPane$ScrollBar', 3, 37)
        ##		select('TextField', 'x\'fe\'')
        select('DelimiterCombo', 'x\'FE\'')
        click('Right')
        select('TabbedPane', '')
        click('Right')
        select('TabbedPane', '')
        click('Copy2')
        assert_p('TextField1', 'Text', 'Copy Done !!! ')
        click('Open')
        select('FileChooser', commonBits.sampleDir() + 'XfeDTAR020.csv')
        select('ComboBox2', 'Generic CSV - enter details')
        commonBits.doEdit(click)

        if window(''):
            select('CheckBox', 'true')
            assert_p('DelimiterCombo', 'Text', 'x\'FE\'')
            assert_p('Table', 'Text', '69684558', 'KEYCODE-NO,0')
            select('Table', 'cell:DATE,0(40118)')
            assert_p('Table', 'Text', '40118', 'DATE,0')
            select('Table', 'cell:DEPT-NO,1(280)')
            ##			assert_p('Table', 'Content', '[[69684558, 20, 40118, 280, 1], [69684558, 20, 40118, 280, -1], [69684558, 20, 40118, 280, 1], [69694158, 20, 40118, 280, 1], [69694158, 20, 40118, 280, -1], [69694158, 20, 40118, 280, 1], [63604808, 20, 40118, 170, 1], [62684671, 20, 40118, 685, 1], [62684671, 20, 40118, 685, -1], [64634429, 20, 40118, 957, 1], [66624458, 20, 40118, 957, 1], [63674861, 20, 40118, 957, 10], [65674532, 20, 40118, 929, 1], [64614401, 59, 40118, 957, 1], [64614401, 59, 40118, 957, 1], [61664713, 59, 40118, 335, 1], [61664713, 59, 40118, 335, -1], [68634752, 59, 40118, 410, 1], [60614487, 59, 40118, 878, 1], [63644339, 59, 40118, 878, 1], [60694698, 59, 40118, 620, 1], [60664659, 59, 40118, 620, 1], [62684217, 59, 40118, 957, 1], [67674686, 59, 40118, 929, 1], [61684613, 59, 40118, 335, 1], [64624770, 59, 40118, 957, 1], [69694814, 166, 40118, 360, 1], [69694814, 166, 40118, 360, 1], [69644164, 166, 40118, 193, 1]]')
            assert_p(
                'Table', 'Content',
                '[[69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70], [65674532, 20, 40118, 929, 1, 3.59], [64614401, 59, 40118, 957, 1, 1.99], [64614401, 59, 40118, 957, 1, 1.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [68634752, 59, 40118, 410, 1, 8.99], [60614487, 59, 40118, 878, 1, 5.95], [63644339, 59, 40118, 878, 1, 12.65], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [62684217, 59, 40118, 957, 1, 9.99], [67674686, 59, 40118, 929, 1, 3.99], [61684613, 59, 40118, 335, 1, 12.99], [64624770, 59, 40118, 957, 1, 2.59], [69694814, 166, 40118, 360, 1, 2.50], [69694814, 166, 40118, 360, 1, 2.50], [69644164, 166, 40118, 193, 1, 21.59]]'
            )
            select('Table', 'cell:DEPT-NO,1(280)')
            commonBits.doSleep()
            select('TabbedPane', 'Normal')
            click('Go')
            commonBits.doSleep()

            commonBits.doSleep()

        close()

        commonBits.doSleep()

        commonBits.doSleep()

        select_menu('Window>>XfeDTAR020.csv>>Table:')

        select('Table', 'cell:1|KEYCODE-NO,0(69684558)')
        assert_p('Table', 'Text', '69684558', '1|KEYCODE-NO,1')
        select('Table', 'cell:2|STORE-NO,0(20)')
        assert_p('Table', 'Text', '20', '2|STORE-NO,0')
        select('Table', 'cell:3|DATE,0(40118)')
        assert_p('Table', 'Text', '40118', '3|DATE,0')
        select('Table', 'cell:4|DEPT-NO,0(280)')
        assert_p('Table', 'Text', '280', '4|DEPT-NO,1')
        select('Table', 'cell:5|QTY-SOLD,0(1)')
        assert_p('Table', 'Text', '-1', '5|QTY-SOLD,1')
        select('Table', 'cell:1|KEYCODE-NO,2(69684558)')
        rightclick('Table', '1|KEYCODE-NO,2')
        select_menu('Edit Record')
        ##		select('Table1', 'cell:1|KEYCODE-NO,2(69684558)')
        select('Table', 'cell:Data,0(69684558)')
        assert_p('Table', 'Text', '20', 'Data,1')
        select('Table', 'cell:Data,0(69684558)')
        ##		assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69684558, 69684558], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1]]')
        assert_p(
            'Table', 'Content',
            '[[KEYCODE-NO, 1, , 69684558, 69684558], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 5.01, 5.01]]'
        )
        select('Table', 'cell:Data,0(69684558)')
        click('Right')
        select('Table', 'cell:Data,0(69694158)')
        ##		assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1]]')
        assert_p(
            'Table', 'Content',
            '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 19.00, 19.00]]'
        )
        select('Table', 'cell:Data,0(69694158)')
        click('Right')
        select('Table', 'cell:Data,0(69694158)')
        ##		assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , -1, -1]]')
        assert_p(
            'Table', 'Content',
            '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , -1, -1], [SALE-PRICE, 6, , -19.00, -19.00]]'
        )
        select('Table', 'cell:Data,0(69694158)')
        click('Right')
        select('Table', 'cell:Data,3(280)')
        assert_p('Table', 'Text', '1', 'Data,4')
        select('Table', 'cell:Data,0(69694158)')
        ##		assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1]]')
        assert_p(
            'Table', 'Content',
            '[[KEYCODE-NO, 1, , 69694158, 69694158], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 280, 280], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 5.01, 5.01]]'
        )
        select('Table', 'cell:Data,0(69694158)')
        click('Right')
        select('Table', 'cell:Data,0(63604808)')
        ##		assert_p('Table', 'Content', '[[KEYCODE-NO, 1, , 63604808, 63604808], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 170, 170], [QTY-SOLD, 5, , 1, 1]]')
        assert_p(
            'Table', 'Content',
            '[[KEYCODE-NO, 1, , 63604808, 63604808], [STORE-NO, 2, , 20, 20], [DATE, 3, , 40118, 40118], [DEPT-NO, 4, , 170, 170], [QTY-SOLD, 5, , 1, 1], [SALE-PRICE, 6, , 4.87, 4.87]]'
        )
        select('Table', 'cell:Data,0(63604808)')
        select_menu('Window>>XfeDTAR020.csv>>Table:')
        ##		select('Table2', 'cell:Data,0(63604808)')
        select('Table', 'cell:1|KEYCODE-NO,2(69684558)')
        select('Table', 'cell:1|KEYCODE-NO,4(69694158)')
        assert_p('Table', 'RowCount', '379')
        select('Table', 'cell:1|KEYCODE-NO,8(62684671)')
        assert_p('Table', 'ColumnCount', '6')
        select('Table', 'cell:1|KEYCODE-NO,8(62684671)')
        commonBits.selectOldFilemenu(select_menu, 'Utilities', 'Compare Menu')
        ##		select('Table', 'cell:1|KEYCODE-NO,8(62684671)')
        click('*1')
        select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin')
        select('FileChooser1',
               commonBits.sampleDir() + 'SampleFiles' + commonBits.fileSep())
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        click('*2')
        select('FileChooser', commonBits.sampleDir() + 'DTAR020.bin')
        click('Right')
        select('TabbedPane', '')
        select('FileChooser', commonBits.sampleDir() + 'XfeDTAR020.csv')
        click('Right')

        if window(''):
            select('TextField', 'x\'FE\'')
            select('CheckBox', 'true')
            ##			select('Table', '')
            assert_p('Table', 'Text', '20', 'STORE-NO,0')
            select('Table', 'cell:DATE,1(40118)')
            ###			assert_p('Table', 'Content', '[[69684558, 20, 40118, 280, 1], [69684558, 20, 40118, 280, -1], [69684558, 20, 40118, 280, 1], [69694158, 20, 40118, 280, 1], [69694158, 20, 40118, 280, -1], [69694158, 20, 40118, 280, 1], [63604808, 20, 40118, 170, 1], [62684671, 20, 40118, 685, 1], [62684671, 20, 40118, 685, -1], [64634429, 20, 40118, 957, 1], [66624458, 20, 40118, 957, 1], [63674861, 20, 40118, 957, 10], [65674532, 20, 40118, 929, 1], [64614401, 59, 40118, 957, 1], [64614401, 59, 40118, 957, 1], [61664713, 59, 40118, 335, 1], [61664713, 59, 40118, 335, -1], [68634752, 59, 40118, 410, 1], [60614487, 59, 40118, 878, 1], [63644339, 59, 40118, 878, 1], [60694698, 59, 40118, 620, 1], [60664659, 59, 40118, 620, 1], [62684217, 59, 40118, 957, 1], [67674686, 59, 40118, 929, 1], [61684613, 59, 40118, 335, 1], [64624770, 59, 40118, 957, 1], [69694814, 166, 40118, 360, 1], [69694814, 166, 40118, 360, 1], [69644164, 166, 40118, 193, 1]]')
            assert_p(
                'Table', 'Content',
                '[[69684558, 20, 40118, 280, 1, 19.00], [69684558, 20, 40118, 280, -1, -19.00], [69684558, 20, 40118, 280, 1, 5.01], [69694158, 20, 40118, 280, 1, 19.00], [69694158, 20, 40118, 280, -1, -19.00], [69694158, 20, 40118, 280, 1, 5.01], [63604808, 20, 40118, 170, 1, 4.87], [62684671, 20, 40118, 685, 1, 69.99], [62684671, 20, 40118, 685, -1, -69.99], [64634429, 20, 40118, 957, 1, 3.99], [66624458, 20, 40118, 957, 1, 0.89], [63674861, 20, 40118, 957, 10, 2.70], [65674532, 20, 40118, 929, 1, 3.59], [64614401, 59, 40118, 957, 1, 1.99], [64614401, 59, 40118, 957, 1, 1.99], [61664713, 59, 40118, 335, 1, 17.99], [61664713, 59, 40118, 335, -1, -17.99], [68634752, 59, 40118, 410, 1, 8.99], [60614487, 59, 40118, 878, 1, 5.95], [63644339, 59, 40118, 878, 1, 12.65], [60694698, 59, 40118, 620, 1, 3.99], [60664659, 59, 40118, 620, 1, 3.99], [62684217, 59, 40118, 957, 1, 9.99], [67674686, 59, 40118, 929, 1, 3.99], [61684613, 59, 40118, 335, 1, 12.99], [64624770, 59, 40118, 957, 1, 2.59], [69694814, 166, 40118, 360, 1, 2.50], [69694814, 166, 40118, 360, 1, 2.50], [69644164, 166, 40118, 193, 1, 21.59]]'
            )
            select('Table', 'cell:DATE,1(40118)')
            commonBits.doSleep()
            select('TabbedPane', 'Normal')
            click('Go')
        close()

        select('TabbedPane', '')
        select('Table', 'cell:Equivalent Record,0(-1)')
        select('Table', 'GeneratedCsvRecord', 'Equivalent Record,0')
        select('Table', 'cell:Equivalent Record,0(0)')
        select('Table1', 'cell:Equivalent Field,5()')
        select('Table', 'cell:Equivalent Record,0(0)')
        select('Table1', 'cell:Equivalent Field,5()')
        ##click('MetalInternalFrameTitlePane', 379, 15)
        ##click('MetalInternalFrameTitlePane', 345, 11)
        click('Right')
        select('TabbedPane', '')
        click('Compare')
        assert_p('TextPane', 'Text', 'Files are Identical !!!')
    close()
Beispiel #22
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Record Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Xml' + commonBits.fileSep() + 'AmsLocationTest1.xml')
		commonBits.doEdit(click)

		select('JTreeTable', 'cell:Xml~Text,4(null)')
		rightclick('JTreeTable', 'Xml~Text,4')
		select_menu('Expand Tree')
		select('JTreeTable', 'cell:Xml~Text,6(null)')
		rightclick('JTreeTable', 'Xml~Text,6')
		select_menu('Copy Record#{s#}')
		select('JTreeTable', 'cell:Xml~Text,6(null)')
		select('LayoutCombo', 'item')
		select('JTreeTable', 'cell:Xml~Prefix,0(null)')
		rightclick('JTreeTable', 'Xml~Prefix,0')
		select_menu('Paste Record#{s#} Prior')
		select('JTreeTable', 'cell:name,0(Location-Details)')
		assert_p('JTreeTable', 'Text', '', 'name,1')
		select('JTreeTable', 'cell:level,0(03)')
		assert_p('JTreeTable', 'Content', '[[, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ]]')
		select('JTreeTable', 'cell:level,0(03)')
		select_menu('View>>Table View #{Selected Records#}')
##		select('JTreeTable', 'cell:level,0(03)')
		select('Table', 'cell:7|name,1(Location-Number)')
		assert_p('Table', 'Text', 'Location-Number', '7|name,1')
		select('Table', 'cell:7|name,2(Location-Type)')
		assert_p('Table', 'Content', '[[item, , , 41, 03, Location-Details, 4, 41, , , , ], [item, , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [item, , , 2, 05, Location-Type, 8, 2, XX, , True, ], [item, , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [/item, , , , , , , , , , , ]]')
		select('Table', 'cell:7|name,0(Location-Details)')
		assert_p('Table', 'RowCount', '5')
		select('Table', 'cell:7|name,0(Location-Details)')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('JTreeTable', 'cell:Xml~Prefix,1(null)')
		rightclick('JTreeTable', 'Xml~Prefix,1')
		select_menu('Paste Record#{s#}')
		select('JTreeTable', 'cell:name,2(Location-Details)')
		assert_p('JTreeTable', 'Text', 'Location-Details', 'name,2')
		select('JTreeTable', 'cell:level,2(03)')
		assert_p('JTreeTable', 'Content', '[[, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , , , 41, 03, Location-Details, 4, 41, , , , ]]')
		select('JTreeTable', 'cell:display-length,2(41)')
		assert_p('JTreeTable', 'RowCount', '3')
		select('JTreeTable', 'cell:display-length,2(41)')
		select_menu('View>>Table View #{Selected Records#}')
		select('JTreeTable', 'cell:display-length,2(41)')
		select('Table', 'cell:7|name,1(Location-Number)')
		assert_p('Table', 'Text', 'Location-Number', '7|name,1')
		select('Table', 'cell:7|name,2(Location-Type)')
		assert_p('Table', 'Content', '[[item, , , 41, 03, Location-Details, 4, 41, , , , ], [item, , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [item, , , 2, 05, Location-Type, 8, 2, XX, , True, ], [item, , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [/item, , , , , , , , , , , ]]')
		select('Table', 'cell:7|name,0(Location-Details)')
		assert_p('Table', 'RowCount', '5')
		select('Table', 'cell:7|name,0(Location-Details)')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')

		if window('Save Changes to file: ' + commonBits.sampleDir() + 'Xml' + commonBits.fileSep() + 'AmsLocationTest1.xml'):
			click('No')
		close()
	close()
Beispiel #23
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'AmsLocationTest1.xml')
        commonBits.doEdit(click)

        select('LayoutCombo', 'copybook')
        select('JTreeTable', 'cell:filename,0(AMSLOCATIONTEST1.cbl)')
        select('JTreeTable', 'cell:Xml~Namespace,0(null)')

        ###assert_p('JTreeTable', 'Content', '[[, , , , AMSLOCATIONTEST1.cbl, , ]]')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , ], [, , ******************************, , , , ], [, , * Location Download, , , , ], [, , ******************************, , , , ], [, , , , 173, , ]]'
        )
        rightclick('JTreeTable', commonBits.fl('Tree') + ',1')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable',
               'cell:Xml~Prefix,3(******************************)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , ], [, , ******************************, , , , ], [, , * Location Download, , , , ], [, , ******************************, , , , ], [, , , , 173, , ]]'
        )
        select('JTreeTable', 'cell:Xml~Prefix,2(* Location Download)')
        assert_p('JTreeTable', 'Text', '* Location Download', 'Xml~Prefix,2')
        select('JTreeTable',
               'cell:Xml~Prefix,3(******************************)')
        assert_p('JTreeTable', 'RowCount', '5')
        select('JTreeTable',
               'cell:Xml~Prefix,3(******************************)')
        rightclick('JTreeTable', 'Xml~Prefix,4')
        select_menu(commonBits.fl('Expand Tree'))
        select('LayoutCombo', 'item')
        select('JTreeTable', 'cell:name,6(Location-Details)')
        assert_p('JTreeTable', 'Text', 'Location-Details', 'name,6')
        select('JTreeTable', 'cell:name,5(Brand)')
        assert_p('JTreeTable', 'RowCount', '9')
        select('JTreeTable', 'cell:name,7(Full-Address)')
        assert_p('JTreeTable', 'Text', 'Full-Address', 'name,7')
        select('JTreeTable', 'cell:name,8(Location-Active)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('JTreeTable', 'cell:name,8(Location-Active)')
        rightclick('JTreeTable', 'Xml~Prefix,6')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:Xml~Prefix,7(null)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('JTreeTable', 'cell:name,7(Location-Number)')
        assert_p('JTreeTable', 'Text', 'Location-Number', 'name,7')
        select('JTreeTable', 'cell:name,8(Location-Type)')
        assert_p('JTreeTable', 'RowCount', '12')
        select('JTreeTable', 'cell:name,8(Location-Type)')
        rightclick('JTreeTable', 'Xml~Prefix,10')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:name,11(Address-Lines)')
        assert_p('JTreeTable', 'Text', 'Address-Lines', 'name,11')
        select('JTreeTable', 'cell:name,11(Address-Lines)')
        rightclick('JTreeTable', 'Xml~Prefix,6')
        select_menu(commonBits.fl('Collapse Tree'))
        select('JTreeTable', 'cell:name,10(State)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 115, 05, Address-Lines, 45, 115, , , , ], [, , , , 10, 05, Postcode, 160, 10, 9(10), true, True, ], [, , , , 3, 05, State, 170, 3, XXX, , True, ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('JTreeTable', 'cell:display-length,7(128)')
        rightclick('JTreeTable', 'display-length,7')
        select('JTreeTable', 'cell:display-length,8(115)')
        rightclick('JTreeTable', 'display-length,8')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:name,9(Address-1)')
        assert_p('JTreeTable', 'Text', 'Address-2', 'name,10')
        select('JTreeTable', 'cell:name,10(Address-2)')
        assert_p('JTreeTable', 'RowCount', '15')
        select('JTreeTable', 'cell:name,11(Address-3)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 115, 05, Address-Lines, 45, 115, , , , ], [, , , , 40, 07, Address-1, 45, 40, X(40), , True, ], [, , , , 40, 07, Address-2, 85, 40, X(40), , True, ], [, , , , 35, 07, Address-3, 125, 35, X(35), , True, ], [, , , , 10, 05, Postcode, 160, 10, 9(10), true, True, ], [, , , , 3, 05, State, 170, 3, XXX, , True, ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('JTreeTable', 'cell:display-length,7(128)')
        rightclick('JTreeTable', 'display-length,7')
        select_menu(commonBits.fl('Collapse Tree'))
        select('JTreeTable', 'cell:name,7(Full-Address)')
        assert_p('JTreeTable', 'RowCount', '9')
        select('JTreeTable', 'cell:name,6(Location-Details)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select('JTreeTable', 'cell:name,7(Full-Address)')
        rightclick('JTreeTable', 'name,7')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:name,8(Address-Lines)')
        assert_p('JTreeTable', 'Text', 'Address-1', 'name,9')
        select('JTreeTable', 'cell:name,10(Address-2)')
        assert_p('JTreeTable', 'RowCount', '15')
        select('JTreeTable', 'cell:name,11(Address-3)')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 115, 05, Address-Lines, 45, 115, , , , ], [, , , , 40, 07, Address-1, 45, 40, X(40), , True, ], [, , , , 40, 07, Address-2, 85, 40, X(40), , True, ], [, , , , 35, 07, Address-3, 125, 35, X(35), , True, ], [, , , , 10, 05, Postcode, 160, 10, 9(10), true, True, ], [, , , , 3, 05, State, 170, 3, XXX, , True, ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
    close()
Beispiel #24
0
def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_03'

	if window('Record Editor'):
		click(commonBits.fl('Choose File'))

		if window('Open'):
			select(commonBits.selectPane(), 'Ams_LocDownload_20041228.txt')
			click('Open')
		close()

		click(commonBits.fl('Edit') + '1')
		click('Filter1')
		select('Table1', 'Loc Type', commonBits.fl('Field') + ',0')
		select('Table1', 'st', commonBits.fl('Value') + ',0')
		select('Table1', 'cell:' + commonBits.fl('Field') + ',2(null)')
		commonBits.save1(click)
		##select('FileChooser', commonBits.userDir() + 'Filter'  + commonBits.fileSep() + 'xx2')
		commonBits.selectFileName(select, keystroke, commonBits.userDir() + 'Filter'  + commonBits.fileSep() + 'xx2')
		commonBits.save1(click)


		select_menu(commonBits.fl('Window') + '>>Ams_LocDownload_20041228.txt>>' + commonBits.fl('Filter Options'))
		commonBits.filter(click)
		select('Table', 'cell:10 - 35|Loc Name,0(Bankstown)')
		assert_p('Table', 'Text', 'Bankstown', '10 - 35|Loc Name,0')
		select('Table', 'cell:8 - 2|Loc Type,1(ST)')
		rightclick('Table', '8 - 2|Loc Type,1')
		select_menu(commonBits.fl('Edit Record'))
##		select('Table1', 'cell:8 - 2|Loc Type,1(ST)')
		select('Table', 'cell:' + commonBits.fl('Data') + ',5(58 Leland Street)')
		assert_p('Table', 'Text', 'Penrith', commonBits.fl('Data') + ',6')
		select('Table', 'cell:' + commonBits.fl('Data') + ',5(58 Leland Street)')
		assert_p('Table', 'Content', '[[Brand Id, 1, 3, TAR, TAR], [Loc Nbr, 4, 4, 5019, 5019], [Loc Type, 8, 2, ST, ST], [Loc Name, 10, 35, Penrith, Penrith], [Loc Addr Ln1, 45, 40, Penrith, Penrith], [Loc Addr Ln2, 85, 40, 58 Leland Street, 58 Leland Street], [Loc Addr Ln3, 125, 35, Penrith, Penrith], [Loc Postcode, 160, 10, 2750, 2750], [Loc State, 170, 3, NSW, NSW], [Loc Actv Ind, 173, 1, A, A]]')
		select('Table', 'cell:' + commonBits.fl('Data') + ',5(58 Leland Street)')
		commonBits.closeWindow(click)
		##click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('Table', 'cell:8 - 2|Loc Type,1(ST)')
		select('Table', 'cell:8 - 2|Loc Type,1(ST)')
		select_menu(commonBits.fl('Window') + '>>Ams_LocDownload_20041228.txt>>' + commonBits.fl('Table:'))
		select('Table2', 'cell:8 - 2|Loc Type,1(ST)')
		select_menu(commonBits.fl('View') + '>>' + commonBits.fl('Execute Saved Filter'))
		##select('FileChooser', commonBits.userDir() + 'Filter'  + commonBits.fileSep() + 'xx2')
		commonBits.selectFileName(select, keystroke, commonBits.userDir() + 'Filter'  + commonBits.fileSep() + 'xx2')
		click(commonBits.fl('Run Dialog')
)
		

		select('Table1', 'cell:' + commonBits.fl('Value') + ',0(st)')
		rightclick('Table1', commonBits.fl('Value') + ',0')
		
		select('Table1', 'cell:' + commonBits.fl('Value') + ',0(st)')
		rightclick('Table1', commonBits.fl('Value') + ',0')
		assert_p('Table1', 'Text', 'st', commonBits.fl('Value') + ',0')

		select('Table1', 'cell:' + commonBits.fl('Value') + ',0(st)')
##		assert_p('Table1', 'Content', '[[Loc Type, true, Contains, st], [, true, Contains, ], [, true, Contains, ], [, true, Contains, ]]')
##		assert_p('Table1', 'Content', '[[, , Loc Type, true, Contains, st], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ], [, And, , true, Contains, ]]');

##		assert_p('Table1', 'Content', '[[, , Loc Type, true, ' + commonBits.fl('Contains') + ', st], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ]]');
		assert_p('Table1', 'Content', '[[, , Loc Type, true, ' + commonBits.fl('Contains') + ', st], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ], [, ' + commonBits.fl('And') + ', , true, ' + commonBits.fl('Contains') + ', ]]');

##		assert_p('Table1', 'Content', '[[, , Loc Type, true, ' + commonBits.fl('Contains') + ', st], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ], [, And, , true, ' + commonBits.fl('Contains') + ', ]]');



		select('Table1', 'cell:' + commonBits.fl('Value') + ',0(st)')
		commonBits.filter(click)

		select('Table', 'cell:10 - 35|Loc Name,6(Leichhardt)')
		assert_p('Table', 'Text', 'Leichhardt', '10 - 35|Loc Name,6')
		select('Table', 'cell:10 - 35|Loc Name,13(Carlingford Court)')
		rightclick('Table', '10 - 35|Loc Name,13')
		select_menu(commonBits.fl('Edit Record'))
##		select('Table1', 'cell:10 - 35|Loc Name,13(Carlingford Court)')
		select('Table', 'cell:' + commonBits.fl('Data') + ',5(Dock 1, 11 Melissa Place)')
		assert_p('Table', 'Text', 'Dock 1, 11 Melissa Place', commonBits.fl('Data') + ',5')
		select('Table', 'cell:' + commonBits.fl('Data') + ',5(Dock 1, 11 Melissa Place)')
		assert_p('Table', 'Content', '[[Brand Id, 1, 3, TAR, TAR], [Loc Nbr, 4, 4, 5090, 5090], [Loc Type, 8, 2, ST, ST], [Loc Name, 10, 35, Carlingford Court, Carlingford Court], [Loc Addr Ln1, 45, 40, , ], [Loc Addr Ln2, 85, 40, Dock 1, 11 Melissa Place, Dock 1, 11 Melissa Place], [Loc Addr Ln3, 125, 35, Marayong, Marayong], [Loc Postcode, 160, 10, 2148, 2148], [Loc State, 170, 3, NSW, NSW], [Loc Actv Ind, 173, 1, A, A]]')
Beispiel #25
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.5.0_11'

    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'recentFiles.xml')
        commonBits.doEdit(click)

        select('LayoutCombo', 'XML Start_Document')
        select(
            'JTreeTable',
            'cell:Xml~Encoding,1( iReport 2 file list - Thu Apr 12 15:22:04 EST 2007 )'
        )
        assert_p('JTreeTable', 'Text', '', 'Xml~Encoding,3')
        select('JTreeTable', 'cell:Xml~Encoding,2()')
        assert_p('JTreeTable', 'RowCount', '4')
        select('JTreeTable', 'cell:Xml~Encoding,3(null)')
        rightclick('JTreeTable', 'Xml~Encoding,3')
        select_menu(commonBits.fl('Expand Tree'))
        select('JTreeTable', 'cell:Xml~Encoding,4(null)')
        assert_p('JTreeTable', 'RowCount', '14')
        select('JTreeTable', 'cell:Xml~Encoding,5(null)')
        rightclick('JTreeTable', 'Xml~Encoding,7')
        select_menu(commonBits.fl('Edit Record'))
        select('Table', 'cell:' + commonBits.fl('Data') + ',2(null)')
        assert_p(
            'Table', 'Content',
            r'[[Xml~Name, 0, , iReportFile, iReportFile], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Xml~End, 1, , , ], [Following~Text, 2, , E:\Work\RecordEdit\Jasper\untitled_report_1.jrxml, E:\Work\RecordEdit\Jasper\untitled_report_1.jrxml]]'
        )
        select(
            'Table', r'cell:' + commonBits.fl('Data') +
            ',4(E:\Work\RecordEdit\Jasper\untitled_report_1.jrxml)')
        ##		assert_p('TextArea', 'Text', r'E:\Work\RecordEdit\Jasper\untitled_report_1.jrxml')
        click('Right')
        select('Table', '''cell:''' + commonBits.fl('Data') + ''',2(
)''')
        select('Table', 'cell:' + commonBits.fl('Text') + ',1()')
        select('Table', 'cell:' + commonBits.fl('Text') + ',1()')
        click('RightM')
        click('Left')
        click('Left')
        select(
            'Table', r'cell:' + commonBits.fl('Data') +
            ',4(E:\Work\RecordEdit\Jasper\DTAR107_rpt1.jrxml)')
        select(
            'Table', r'cell:' + commonBits.fl('Text') +
            ',4(E:\Work\RecordEdit\Jasper\DTAR107_rpt1.jrxml)')
        assert_p(
            'Table', 'Content',
            r'[[Xml~Name, 0, , iReportFile, iReportFile], [Xml~Prefix, 3, , , ], [Xml~Namespace, 4, , , ], [Xml~End, 1, , , ], [Following~Text, 2, , E:\Work\RecordEdit\Jasper\DTAR107_rpt1.jrxml, E:\Work\RecordEdit\Jasper\DTAR107_rpt1.jrxml]]'
        )
        select(
            'Table', r'cell:' + commonBits.fl('Text') +
            ',4(E:\Work\RecordEdit\Jasper\DTAR107_rpt1.jrxml)')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')

        ##if window(r'Save Changes to file: ' + commonBits.sampleDir() + 'Xml\recentFiles.xml'):
        ##	click('No')
        ##close()
    close()
Beispiel #26
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_17'
    if window('Record Editor'):
        select(
            'FileChooser',
            commonBits.sampleDir() + 'Xml' + commonBits.fileSep() +
            'AmsLocationTest1.xml')
        commonBits.doEdit(click)
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',4')
        select_menu(commonBits.fl('Expand Tree'))  ##		select('JTreeTable', '')
        rightclick('JTreeTable', commonBits.fl('Tree') + ',6')
        select_menu(commonBits.fl('Expand Tree'))
        select('LayoutCombo', 'item')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'Following~Text,5')
        select_menu(commonBits.fl('Hide Column'))
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , ], [, , ******************************, , , , , , , , , ], [, , * Location Download, , , , , , , , , ], [, , ******************************, , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True], [, , , , 41, 03, Location-Details, 4, 41, , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True], [, , , , 2, 05, Location-Type, 8, 2, XX, , True], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True], [, , , , 128, 03, Full-Address, 45, 128, , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'Xml~End,7')
        select_menu(commonBits.fl('Hide Column'))
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , ], [, , ******************************, , , , , , , , ], [, , * Location Download, , , , , , , , ], [, , ******************************, , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , ], [, , , , 3, 03, Brand, 1, 3, x(3), ], [, , , , 41, 03, Location-Details, 4, 41, , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true], [, , , , 2, 05, Location-Type, 8, 2, XX, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), ], [, , , , 128, 03, Full-Address, 45, 128, , ], [, , , , 1, 03, Location-Active, 173, 1, X, ]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'numeric,7')
        select_menu(commonBits.fl('Hide Column'))
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , ], [, , ******************************, , , , , , , ], [, , * Location Download, , , , , , , ], [, , ******************************, , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, ], [, , , , 3, 03, Brand, 1, 3, x(3)], [, , , , 41, 03, Location-Details, 4, 41, ], [, , , , 4, 05, Location-Number, 4, 4, 9(4)], [, , , , 2, 05, Location-Type, 8, 2, XX], [, , , , 35, 05, Location-Name, 10, 35, X(35)], [, , , , 128, 03, Full-Address, 45, 128, ], [, , , , 1, 03, Location-Active, 173, 1, X]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'storage-length,6')
        select_menu(commonBits.fl('Show Column') + '>>numeric')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , ], [, , ******************************, , , , , , , , ], [, , * Location Download, , , , , , , , ], [, , ******************************, , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , ], [, , , , 3, 03, Brand, 1, 3, x(3), ], [, , , , 41, 03, Location-Details, 4, 41, , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true], [, , , , 2, 05, Location-Type, 8, 2, XX, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), ], [, , , , 128, 03, Full-Address, 45, 128, , ], [, , , , 1, 03, Location-Active, 173, 1, X, ]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'numeric,7')
        select_menu(commonBits.fl('Show Column') + '>>Xml~End')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , ], [, , ******************************, , , , , , , , , ], [, , * Location Download, , , , , , , , , ], [, , ******************************, , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True], [, , , , 41, 03, Location-Details, 4, 41, , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True], [, , , , 2, 05, Location-Type, 8, 2, XX, , True], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True], [, , , , 128, 03, Full-Address, 45, 128, , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'Xml~End,7')
        select_menu(commonBits.fl('Show Column') + '>>Following~Text')
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , * Location Download, , , , , , , , , , ], [, , ******************************, , , , , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, , , , ], [, , , , 3, 03, Brand, 1, 3, x(3), , True, ], [, , , , 41, 03, Location-Details, 4, 41, , , , ], [, , , , 4, 05, Location-Number, 4, 4, 9(4), true, True, ], [, , , , 2, 05, Location-Type, 8, 2, XX, , True, ], [, , , , 35, 05, Location-Name, 10, 35, X(35), , True, ], [, , , , 128, 03, Full-Address, 45, 128, , , , ], [, , , , 1, 03, Location-Active, 173, 1, X, , True, ]]'
        )
        select_menu(
            commonBits.fl('Edit') + '>>' + commonBits.fl('Show / Hide Fields'))
        select('Table', 'cell:' + commonBits.fl('Show') + ',9(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',10(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',11(true)')
        click(commonBits.fl('Go'))
        assert_p(
            'JTreeTable', 'Content',
            '[[, , , , AMSLOCATIONTEST1.cbl, , , , , ], [, , ******************************, , , , , , , ], [, , * Location Download, , , , , , , ], [, , ******************************, , , , , , , ], [, , , , 173, 01, Ams-Vendor, 1, 173, ], [, , , , 3, 03, Brand, 1, 3, x(3)], [, , , , 41, 03, Location-Details, 4, 41, ], [, , , , 4, 05, Location-Number, 4, 4, 9(4)], [, , , , 2, 05, Location-Type, 8, 2, XX], [, , , , 35, 05, Location-Name, 10, 35, X(35)], [, , , , 128, 03, Full-Address, 45, 128, ], [, , , , 1, 03, Location-Active, 173, 1, X]]'
        )
        ##		select('JTreeTable', '')
        rightclick('JTreeTable', 'picture,6')
    close()