Forum Discussion
Yes I can see the element "Default Settings" when code is executed
to brief you more
See attached Screenshot
There are two tabs in my screen (snapshots and Presets) , both are not gettings identified by test complete
selecting "Snapshots" tab in the page and execting the above codewill give all the items under snapshots namely "Abcd, ...Snapshot #1..."
But even after exceuting the same code after selecting "Presets" tab , still i will get items listed under "snapshots" tab instead of getting elements under preset tab
Hi hc_vinod,
It makes sense to update the object tree when switching between tabs. You can do the Refresh method for this. For example:
Set win = 'get the window containing tabs
Call Win.obj.obj….ClickTab("Presets")
win.Refresh
Does it work for you?
- Colin_McCrae11 years agoCommunity Hero
This all sounds like your objects are getting all mixed up.
I suspect, primarily, as it can't tell the difference bewteen the tabs. So it's finding a conrol on tab 1 that it thinks is the tab1 + control, but you think should be tab2 + control. How are your objects mapped? Step through your object tree, highlighting each parts as you go. And try highlighting tab 2 when tab 1 is actually open. If it flashes and identifies tab 1, when it should be tab 2, then your identification properties aren't unique enough. Ditto the list view. It's probably finding the one on tab 1, when you want tab 2.