Forum Discussion
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 Sub
It 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
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.- Marsha_R11 years ago
Champion Level 3
I had something like this where the comparison worked fine when it was in a keyword test but when I converted to script I started getting the runtime errors. What ended up working for me is trimming all the strings.
This is my comparison of a grid value to an Excel value (of type General).
While aqString.Trim(itemlotattributes_browse.wValue(AttributeIndex, "Attribute ID")) <> aqString.Trim(Project.Variables.POAttributes.Value("name"))