Forum Discussion
Can you post a bit more of your script?
- IRISQATeam11 years agoContributor
Hi Ryan,
Thanks for your reply. Here is the code.
'
'Saving Personal Tax Forms & Reports
'
Sub SavePersonalTaxExternalIssuesReports
Set Driver = DDT.ExcelDriver("C:\IRISAutomation\IRISExternalIssues\IRISExternalIssues.xls" ,"SavePeronalTaxIssuesReports")
'Appending the log
Log.AppendFolder("Saving Reports For Personal Tax External Issues Clients")
'Start of Do Loop
Do
'Call selectClientAndTaxYear
Call ExtraSmallDelay
Call SelectClientAndTaxYear
'If report type is Tax Computations
If(Driver.Value("ReportType")="TaxComputation") Then
Call ExtraSmallDelay
Call TaxComputation
End If
'Loop until EOF
Call Driver.Next
Loop Until Driver.EOF
'Pop log folder in test log
Log.PopLogFolder()
End Sub
'
'Selecting the client & tax year
'
Sub SelectClientAndTaxYear
'Appending the log
Log.AppendFolder("Select Client & Tax Year " + DDT.CurrentDriver.Value("Description"))
'Select Client|Select
Aliases.PersonalTaxObjectMap.wndIWINPTAX.MainMenu.Click("Client|Select")
'Select Search By Combobox
Aliases.PersonalTaxObjectMap.wndClientBrowser.cmbSearchBy.ClickItem("by Client ID")
'Enter Client Identifier and select client
Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Click
Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Keys("^a")
Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Keys("[BS]")
Set Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Keys(DDT.CurrentDriver.Value("ClientId"))
'Click Select button
Call VerySmallDelay
Aliases.PersonalTaxObjectMap.wndClientBrowser.btnSelect.Click
'Click Leave button in No Client Tax Data Entered
If(Aliases.PersonalTaxObjectMap.wndNoClientTaxDataEntered.Exists)Then
Aliases.PersonalTaxObjectMap.wndNoClientTaxDataEntered.btnLeave.Click
End If
'Select the tax year
Set enterTaxYear = Aliases.PersonalTaxObjectMap.wndIWINPTAX.ToolbarWindow32.cmbTaxYear
enterTaxYear.ClickItem(DDT.CurrentDriver.Value("TaxYear"))
'Pop log folder in test log
Log.PopLogFolder()
End SubIt is getting exception on the second client.
I also performed debugging, for first time it brings correct values, for second it bring null value.
Regards,
Zeeshan
- Ryan_Moran11 years agoValued Contributor
Hmm..
Can you try this and see if it still errors?
' 'Saving Personal Tax Forms & Reports ' Sub SavePersonalTaxExternalIssuesReports Set Driver = DDT.ExcelDriver("C:\IRISAutomation\IRISExternalIssues\IRISExternalIssues.xls" ,"SavePeronalTaxIssuesReports") 'Appending the log Log.AppendFolder("Saving Reports For Personal Tax External Issues Clients") 'Start of Do Loop Do 'Call selectClientAndTaxYear Call ExtraSmallDelay Call SelectClientAndTaxYear 'If report type is Tax Computations If(Driver.Value("ReportType")="TaxComputation") Then Call ExtraSmallDelay Call TaxComputation End If 'Loop until EOF Call Driver.Next Loop Until Driver.EOF 'Pop log folder in test log Log.PopLogFolder() End Sub ' 'Selecting the client & tax year ' Sub SelectClientAndTaxYear 'Appending the log Log.AppendFolder("Select Client & Tax Year " + DDT.CurrentDriver.Value("Description")) 'Select Client|Select Aliases.PersonalTaxObjectMap.wndIWINPTAX.MainMenu.Click("Client|Select") 'Select Search By Combobox Aliases.PersonalTaxObjectMap.wndClientBrowser.cmbSearchBy.ClickItem("by Client ID") 'Enter Client Identifier and select client Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Click Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Keys("^a") Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Keys("[BS]") Aliases.PersonalTaxObjectMap.wndClientBrowser.txtClientId.Keys(DDT.CurrentDriver.Value("ClientId")) 'Click Select button Call VerySmallDelay Aliases.PersonalTaxObjectMap.wndClientBrowser.btnSelect.Click 'Click Leave button in No Client Tax Data Entered If(Aliases.PersonalTaxObjectMap.wndNoClientTaxDataEntered.Exists)Then Aliases.PersonalTaxObjectMap.wndNoClientTaxDataEntered.btnLeave.Click End If 'Select the tax year Set enterTaxYear = Aliases.PersonalTaxObjectMap.wndIWINPTAX.ToolbarWindow32.cmbTaxYear enterTaxYear.ClickItem(DDT.CurrentDriver.Value("TaxYear")) 'Pop log folder in test log Log.PopLogFolder() End Sub- IRISQATeam11 years agoContributor
Hi Ryan,
I tried that but still getting that run time exception.