Understanding Object Comparisons
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understanding Object Comparisons
If I change values in several text boxes, then run the code that was aquired from the Copy Text window the procedure produces a compare error but only shows the difference in the first text box that it encounters that has changed and ignores the rest. My understanding from reading the help file is that you should get a list of all items that have changed.
I have also used the Database Table Checkpoint to monitor data directly in the tables and it correctly identifies all changes that occur.
I have included images of the panel in question in its original state before capturing the object (image 1), the contents of the CheckPoint Wizard (image 2), the panel after making changes (image 3), and the error message produced by running the code generated by the wizard (image 4). Notice that only 1 of the changes is indicated in the error log. Shouldn't I be seeing all of the changes the way I do when doing a database compare?
Is there something I am missing??
Thanks
Bill
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the quick reply it is appreciated as is the code sample you provide. Unfortunately I'm not familiar at all with JScript and was wondering if you would be able to post this in VBScript format? Sorry for the inconvenience.
Bill
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
Thanks again for the prompt reply but I'm getting an error trying to run this code. This is the setup code for the test:
Sub TestPropertyObjects
Dim obj, storedObj
Set obj = Sys.Process("smartwin").VCLObject("StockForm").VCLObject("pagMain").VCLObject("tabDetails").VCLObject("panDetailsMain").VCLObject("panPricingOtherSwitchesTaxes").VCLObject("panPrices")
Set storedObj = Objects.StoredObject("StockPrice")
Call Log.Message(CompareObjects(obj, storedObj, ""))
Set obj = nothing
Set storedObj = nothing
End Sub
I get an "Object Does Not Support This Property or method" exception when the script tries to execute the line "if Not child Then ret = False" in the CompareObjects function.
At the point of executing this line child.FullName evaluates to Sys.Process("smartwin").VCLObject("StockForm").VCLObject("pagMain").VCLObject("tabDetails").VCLObject("panDetailsMain").VCLObject("panPricingOtherSwitchesTaxes").VCLObject("panPrices").VCLObject("edtCostRate")
which appears to me to be correct because edtCostRate is the first field on the form that is being checked.
Any help would be appreciated.
Thanks again
Bill
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Works perfectly! Thanks for all of your help, I couldn't have done otherwise.
Thanks
Bill
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One last question and there is no hurry for an answer on this. If I start creating Object Checkpoints and Database Checkpoints to use in my scripts, does TestComplete have to load all of the (baseline) information for each checkpoint into memory when it starts or does it read from disk as the comparisons are called?
Thanks
Bill
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
Bill
