| || |
I badly need your help. I need to create the code to verify which column is missed from Siebel List. Does anyone has any idea how to do that? I created the code which checks the names by index and reports if the column exists.
For i=0 to 14
var_GetColumnRepositoryName = oSiebApplet.SiebList("List").GetColumnRepositoryNa meByIndex(i)
Reporter.ReportEvent 0, "The column name is ", " " & var_GetColumnRepositoryName &""
If ColumnRepositoryNameByIndex=var_ColumnRepositoryNa me Then
Reporter.ReportEvent 0, " ", "The expected column was found."
Reporter.ReportEvent 1, " ", "The column was not found."
Please help. I would really appriciate it.
Thanks in advance.
Check your e-mail Oxana [img]/images/graemlins/smile.gif[/img]
Not sure its what you looking for, but for readers visiting this thread:
Here is what I did. I created a separate column in the QTP DataTable and named it "SiebListColumns". Then, I stored all the column names from the SiebList in the DataTable column, that I created and named as "SiebListColumns". Next, I ran the following code:
<font class="small">Code:</font><hr /><pre>
With SiebApplication("").SiebScreen("").SiebView("").Si ebApplet("").SiebList("")
For x = 0 to .GetROProperty("columnscount")
If DataTable("SiebListColumns", dtLocalSheet) = .GetColumnRepositoryNameByIndex(x) Then
Reporter.ReportEvent micPass, "Column Test", "Column #" & x & " Matched."
Reporter.ReportEvent micFail, "Column Test", "Column #" & x & " Failed." & vbLf & vbLf & _
"Expected: " & DataTable("SiebListColumns", dtLocalSheet) & vbLf & _
"Actual: " & .GetColumnRepositoryNameByIndex(x)
Thanks very much Anshoo..I will try your code..Great!! I will let you know by email how it works.
No problem. Please post here and update this thread as well, if possible..
The code works fine. The only problem I found is if you hide few columns the code wont work.