Weird object property - 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: Weird object property (/Thread-Weird-object-property) |
Weird object property - Carol - 03-02-2008 Hi there, I have seem some weird object property change behavior. Basically, my code as below: Code: Dim current_node My question for this kind of codes is What has caused the lost of attribut value for current_node? as I have never reset the current_node object to other object or change its attribute between the two statments of message. This kind of behaviors has been seemed when I implement drag and drop. Object variable which original contain some attribute become an empty object right after the lines of drag and drop. Any insight? Thank you in advance. Carol RE: Weird object property - sreekanth - 03-04-2008 Carol, can you just explain the last action in your code or else the elements in your page regards. RE: Weird object property - Carol - 03-06-2008 The last action I did is this dataPane.WebEdit("name:=OK").Click() What happen is I am working on a web page. There are some options: such as " Rank". The action I am perform is as such 1) Define an object called "current_node" 2) trigger the " Rank" option, which result a pop up dialog to show. 3) I fill in the information in pop up dialog and hit "OK" button to submit the information. The pop up dialog disapper, and I am back to the web page. What I have found is I lost the content of " current_node" after I back to the webpage. , what I mean is when I do a current_node.GetROProperty("html id"), I get "". I can get the html id using the same method before the pop up dialog shown or even after the pop up diaglog show. But just as soon as I hit "OK" to dismiss the dialog, I get the html id = "". Do you have an insight what happen here? I have observed similar behavour right after I implemt drag and drop, a global object defined before lost it content. Many thanks Carol RE: Weird object property - sreekanth - 03-11-2008 Sorry Carol for being late, i think the web page might have been loaded with new elements or The "current_node" might have been created after clicking on the function which will activate popup.(this can happen if you popup window has the same name as your main web window) so place the declaration and definition art of "current_node" before invoking popup. let us know if it works. i promiose the reply wont be late |