Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird object property
#1
Not Solved
Hi there,

I have seem some weird object property change behavior. Basically, my code as below:

Code:
Dim current_node
Set current_node = dataPane.WebElement("html id:=Crosstab_row_1")

msgbox current_node.GetROProperty("html id ")
' the message box will show [b]Crosstab_row_1[/b]
Dim condition
Set condition=dataPane.WebElement("class:=combobox_selected_row_table_text")
if condition.GetROProperty("innertext")="selection" then
   dataPane.WebEdit("class:= inputValue").Set "5"
   dataPane.WebEdit("name:=OK").Click()
End If

msgbox current_node.GetROProperty("html id ")
' the message box will show as empty

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
Reply
#2
Not Solved
Carol,

can you just explain the last action in your code

or else the elements in your page

regards.
Reply
#3
Not Solved
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
Reply
#4
Not Solved
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Change property of object (WpfButton) robertosalemi 2 2,627 11-22-2016, 12:43 PM
Last Post: Ankur
  Uft 12 - Identification of Google Chrome Object's Property value as plain text teja2730 0 2,583 02-02-2015, 05:22 PM
Last Post: teja2730
  Object doesn't support this property or method: 'webedit' Divya Roopa 3 10,021 03-11-2014, 07:26 AM
Last Post: basanth27
  Error object doesnt support this property or method seerick 7 8,017 06-08-2013, 09:32 PM
Last Post: seerick
Shy Descriptive Program - Not able to use object property which is having Bracket srselva 2 2,786 09-28-2012, 11:19 PM
Last Post: srselva

Forum Jump:


Users browsing this thread: 1 Guest(s)