The other issue that I am seeing in the latest version is how I need to point to a resolver that exists in my test.
I noticed that in this version I have to put Modules.ModuleName in the first part of the test which is something was no longer required in 2.0.
However, Marathon is not recognizing my other resolver.
Please see the attached test:
#{{{ Marathon
from default import *
#}}} Marathon
from Modules.Preferences_DataDirectory1 import *
from Modules.libraUtils import *
from com.axiomainc.libra.gui.marathon.util import ResourceRetriever (THIS IS ONE OF THE RESOLVERS – how do I tell Marathon where this file is located? – Also this works fine in 2.0 - the way it is written).
from Modules.Preferences_Standard_ByCategory import *
from Modules.OS_Selection import *
def test():
java_recorded_version = '1.6.0_23'
Preferences_Debug()
folderPath = ResourceRetriever.getCurrentWorkingDir() + "\\src\\test\\resources\\marathon_workspaces\\UITests\\Accounts\\"
workspaceFile = folderPath + "SAVE_ACCOUNT.act"
windowTitle = openWorkspace("/src/test/resources/marathon_workspaces/UITests/Accounts/SampleWorkspace.wsp");
if window(windowTitle):
click('SelectiveEditableTree', 'Accounts')
doubleclick('SelectiveEditableTree', 'Accounts')
select('SelectiveEditableTree', '[Accounts]')
rightclick('SelectiveEditableTree', 'Accounts')
#New Account
select_menu('New Account')
select('SelectiveEditableTree', '[Accounts]')
if window('New Account'):
select('LibraTextField', 'NewAccount')
select('LibraTextField2', 'New Account')
select('NumberField', '$1,000,000.0000')
select('BenchmarkComboBox', 'Benchmark')
select('UnitGroupComboBox', 'BenchmarkShortShares')
select('RiskmodelComboBox', 'SmallRiskModel')
click('OK')
close()
select('SelectiveEditableTree', '[NewAccount]')
select('SelectiveEditableTree', '[NewAccount]')
assert_p('SelectiveEditableTree', 'Text', 'NewAccount', 'NewAccount')
select('SelectiveEditableTree', '[NewAccount]')
#Load a new Account
select_menu('Tools>>Import>>Account>>Delimited Non-taxable Account...')
if window('Import Delimited Non-taxable Account...'):
click('...')
close()
accountFileID = "DelimitedNoTaxAccount.csv"
if window('Select File'):
SelectFileBasedOnOS(folderPath, accountFileID)
#select('File name', folderPath + accountFileID)
#keystroke('File name', 'Enter')
close()
if window('Import Delimited Non-taxable Account...'):
select('TextField', 'Load Delimited Non-Tax Account')
click('Ok')
close()
if window('Processing Problem'):
click('Yes')
close()
click('SelectiveEditableTree', 'Load Delimited Non-Tax Account')
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
assert_p('SelectiveEditableTree', 'Text', 'Load Delimited Non-Tax Account', 'Load Delimited Non-Tax Account')
sleep(2)
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
rightclick('SelectiveEditableTree', 'Load Delimited Non-Tax Account')
#Show Account
select_menu('Show Account')
click('Tab.Load Delimited Non-Tax Account -> Holdings', 39, 10)
click('GroupByTreeTable')
assert_content('GroupByTreeTable', [ ['IBM', 'International Business Machines Corp.', '0.1', '10.0', '51.23', '512.3', '0.21900556170673002', '512.3', '1.0'],
['MSFT', 'Microsoft Corp.', '0.8', '23.0', '67.89', '1561.47', '0.6675202311891621', '1561.47', '1.0'],
['ORCL', 'Oracle Corp.', '0.0', '12.0', '22.12', '265.44', '0.1134742071041078', '265.44', '1.0']
])
click('SelectiveEditableTree', 'Accounts')
click('SelectiveEditableTree', 'Accounts')
select('SelectiveEditableTree', '[Accounts]')
rightclick('SelectiveEditableTree', 'Accounts')
#New Tax Account
select_menu('New Account')
select('SelectiveEditableTree', '[Accounts]')
if window('New Account'):
select('LibraTextField', 'NewTaxAccount')
select('LibraTextField2', 'New Tax Account')
select('CheckBox', 'true')
select('NumberField', '2000000')
select('NumberField1', '2000000')
select('BenchmarkComboBox', 'Benchmark')
select('RiskmodelComboBox', 'SmallRiskModel')
select('PortfolioComboBox', 'FIFO')
select('PortfolioComboBox', 'OPTIMAL')
select('NumberField4', '.35')
select('NumberField5', '.15')
click('OK')
close()
select('SelectiveEditableTree', '[NewTaxAccount]')
select('SelectiveEditableTree', '[NewTaxAccount]')
assert_p('SelectiveEditableTree', 'Text', 'NewTaxAccount', 'NewTaxAccount')
select('SelectiveEditableTree', '[NewTaxAccount]')
click('PortfolioImagePanel', 6, 629)
select('SelectiveEditableTree', '[NewTaxAccount]')
rightclick('SelectiveEditableTree', 'NewTaxAccount')
#Open a New Tax Account
select_menu('Show Account')
click('Tab.NewTaxAccount -> Tax Summary', 59, 11)
click('AccountTaxTable', '{0, Term}')
assert_content('AccountTaxTable', [ ['Realized Short', '0.35', '0.0', '0.0'],
['Realized Long', '0.15', '0.0', '0.0'],
['Unrealized Short', '0.35', '0.0', '0.0'],
['Unrealized Long', '0.15', '0.0', '0.0']
])
click('SelectiveEditableTree', 'NewAccount')
click('SelectiveEditableTree', 'NewAccount')
select('SelectiveEditableTree', '[NewAccount]')
sleep(2)
click('SelectiveEditableTree', 'Load Delimited Non-Tax Account')
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
rightclick('SelectiveEditableTree', 'Load Delimited Non-Tax Account')
select_menu('Show Account')
#Account Holdings - View charts in Data Visualization
click('Tab.Load Delimited Non-Tax Account -> Holdings', 50, 5)
click('imgs/icons/tab_visualModesSwitch.gif')
select_menu('Chart')
click('Graph', 947, 357)
assert_p('Graph', 'Enabled', 'true')
click('SelectiveEditableTree', 'Jeff_Account')
doubleclick('SelectiveEditableTree', 'Jeff_Account')
select('SelectiveEditableTree', '[Jeff_Account]')
click('Tab.Jeff_Account -> Holdings', 20, 12)
click('SelectiveEditableTree', 'AccountShort')
click('SelectiveEditableTree', 'AccountShort')
doubleclick('SelectiveEditableTree', 'AccountShort')
select('SelectiveEditableTree', '[AccountShort]')
#Account - Long/Short Holdings -- View charts in Data visualization
click('Tab.AccountShort -> Long/Short Holdings', 88, 4)
click('GroupByTreeTable')
assert_content('GroupByTreeTable', [ ['ARBA', 'Ariba', '0.2', '20.0', '2.0', '0.0', '40.0', '0.0', '40.0', '1.0', '0.0'],
['AZPN', 'AspenTech Inc.', '0.0', '12.0', '0.0', '-100.0', '0.0', '-1200.0', '-1200.0', '0.0', '1.0'],
['ORCL', 'Oracle Corp.', '0.0', '12.0', '9000.0', '0.0', '108000.0', '0.0', '108000.0', '1.0', '0.0']
])
click('imgs/icons/tab_visualModesSwitch.gif')
select_menu('Chart')
assert_p('Graph', 'Enabled', 'true')
click('SelectiveEditableTree', 'AccountTax')
doubleclick('SelectiveEditableTree', 'AccountTax')
select('SelectiveEditableTree', '[AccountTax]')
click('Tab.AccountTax -> Tax Summary', 53, 10)
click('Tab.AccountTax -> Holdings', 29, 10)
click('imgs/icons/tab_visualModesSwitch.gif')
select_menu('Chart')
click('Graph', 642, 271)
assert_p('Graph', 'Enabled', 'true')
click('Graph', 1082, 167)
click('imgs/icons/tab_visualModesSwitch.gif')
select_menu('Hi-Lo')
click('Add')
click('AnalysisTable', '{0, B}')
assert_content('AnalysisTable', [ ['ARBA', 'Ariba', '0.2', '100']
])
click('SelectiveEditableTree', 'AccountTaxShort')
doubleclick('SelectiveEditableTree', 'AccountTaxShort')
select('SelectiveEditableTree', '[AccountTaxShort]')
click('Tab.AccountTaxShort -> Long/Short Holdings', 90, 3)
click('GroupByTreeTable')
assert_p('GroupByTreeTable', 'Text', 'cell:Short Shares,1(0.0)')
assert_content('GroupByTreeTable', [ ['IBM', 'International Business Machines Corp.', '0.1', '10.0', '0.0', '-20.0', '0.0', '-200.0', '-200.0', '0.0', '1.0'],
['SAP', 'SAP AG', '0.0', '15.0', '50.0', '0.0', '750.0', '0.0', '750.0', '1.0', '0.0']
])
click('imgs/icons/tab_visualModesSwitch.gif')
select_menu('Chart')
click('Graph', 874, 397)
assert_p('Graph', 'Enabled', 'true')
click('imgs/icons/tab_visualModesSwitch.gif')
select_menu('Hi-Lo')
click('Add')
click('AnalysisTable', '{1, B}')
assert_content('AnalysisTable', [ ['IBM', 'International Business Machines Corp.', '0.1', '100'],
['SAP', 'SAP AG', '0.0', '0']
])
click('SelectiveEditableTree', 'NewTaxAccount')
click('SelectiveEditableTree', 'NewTaxAccount')
click('SelectiveEditableTree', 'Load Delimited Non-Tax Account')
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
select('SelectiveEditableTree', '[Load Delimited Non-Tax Account]')
rightclick('SelectiveEditableTree', 'Load Delimited Non-Tax Account')
#Save an Account
select_menu('Save Account')
if window('Save'):
select('LibraFileChooser', workspaceFile)
close()
sleep(2)
click('SelectiveEditableTree', 'NewAccount')
click('SelectiveEditableTree', 'NewAccount')
select('SelectiveEditableTree', '[NewAccount]')
select('SelectiveEditableTree', '[NewAccount]')
rightclick('SelectiveEditableTree', 'NewAccount')
#Remove Account
select_menu('Remove Account')
if window('Remove Account'):
click('Yes')
close()
click('SelectiveEditableTree', 'Account')
select('SelectiveEditableTree', '[Account]')
rightclick('SelectiveEditableTree', 'Account')
select_menu('Show Account')
#Tax Account - General
click('Tab.Account -> General', 24, 12)
#Edit Holding Lots
click('Edit Holding Lots')
if window('Edit Holding Lots'):
click('DefaultSortableTable', '{0, Asset}')
assert_content('DefaultSortableTable', [ ['ARBA', 'Ariba', '-100.0', '09/01/2008', '14.0'],
['CompAsset1CCB', '', '10.0', '02/08/2008', '10.0']
])
click('Modify')
close()
if window('Asset Selection'):
click('MultiTypeSelector$1', '{1, Shares}')
select('MultiTypeSelector$1', '20', '{1, Shares}')
click('MultiTypeSelector$1', '{1, Open Date}')
click('OK')
close()
click('Tab.Account -> Holding Lots', 57, 18)
click('GroupByTreeTable')
assert_content('GroupByTreeTable', [ ['ARBA', 'Ariba', '-100.0', 'Mon Sep 01 00:00:00 EDT 2008', '14.0', '-1400.0', '20.0', '-2000.0', '-600.0', 'short-term'],
['CompAsset1CCB', '', '20.0', 'Fri Feb 08 00:00:00 EST 2008', '10.0', '200.0', '50.05', '1001.0', '801.0', 'short-term']
])
click('SelectiveEditableTree', 'AccountTest')
click('SelectiveEditableTree', 'AccountTest')
doubleclick('SelectiveEditableTree', 'AccountTest')
select('SelectiveEditableTree', '[AccountTest]')
#Tax Account - Edit Holdings
click('Edit Holdings')
if window('Edit Holdings'):
click('DefaultSortableTable', '{0, Asset}')
assert_content('DefaultSortableTable', [ ['ARBA', 'Ariba', '80.0']
])
click('Modify')
close()
if window('Asset Selection'):
click('MultiTypeSelector$1', '{0, Shares}')
select('MultiTypeSelector$1', '90', '{0, Shares}')
click('OK')
close()
select('SelectiveEditableTree', 'AccountTest', 'AccountTest')
click('Tab.AccountTest -> Holdings', 25, 15)
click('GroupByTreeTable')
assert_content('GroupByTreeTable', [ ['ARBA', 'Ariba', '0.8', '20.0', '90.0', '1800.0', '1800.0', '1800.0', '1.0']
])
close()
removeWorkspaceFiles(workspaceFile)
removerelatedWorkspaceFiles(workspaceFile)