Micro Focus QTP (UFT) Forums
SetToProperty question with shared repository - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: SetToProperty question with shared repository (/Thread-SetToProperty-question-with-shared-repository)



SetToProperty question with shared repository - petes85gt - 05-09-2012

Greetings,

If you use Settoproperty for an object in a shared repository, will the newproperty last between actions?

Let's say I have a script with 2 actions that use the same shared repository, Action1 and Action2. Object1 has a ordinal value of 0 in the repository. If Action1 sets Ordinal value to 1, when it shows up in Action2 (which is called directly after Action1 finishes), Will it still have value of 1?


RE: SetToProperty question with shared repository - sshukla12 - 05-10-2012

Hi,

I think set to property last till your script is in execution , so change in property will be reflected for action 2 which is in continuation to action 1.

Regards,
Sankalp


RE: SetToProperty question with shared repository - petes85gt - 05-11-2012

Thanks for the response, that was what the documentation seemed to indicate. It doesn't look like SETTOPROPERTY is really designed to work with a shared repository. It seems to really screw around with identification properties. I have spent some time messing with it and it looks like 2 things are happening.

1) changes only last through the duration of the action, and revert back upon next action call, probably due to number 2 below.

2) SETTOPROPERTY will not make changes to a shared repository.


RE: SetToProperty question with shared repository - Ankesh - 05-11-2012

Yes. SETTOPROPERTY will not make changes to a shared repository. it will just update the object value during runtime. No Changes to OR will be made.

Thanks!
Ankesh


RE: SetToProperty question with shared repository - mrinal_nandi - 05-11-2012

Even it will not update the local repository also, Updated value for the object is valid for run time only.