Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetROproperty Help!
#1
Solved: 11 Years, 5 Months ago
Hi all,

I want to fetch dynamically changing data such as a share price by using GetROproperty.

I have tried the following code:

Code:
Dim LTP
LTP=Browser("Browser").Page("Page").Frame("Frame1").WebElement("WebTable").GetROProperty("innertext")
msgbox ("The Price is " &LTP)


This is just giving me the msgbox with text "The price is"

What else do I need to check? Any ideas on this?


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 5 Months ago
Hi!

Nothing much reqd here .Please try with this code now ,it will retrieve the reqd . Property and display it .

Code:
Dim LTP
LTP=Browser("Browser").Page("Page").Frame("Frame1").WebElement("WebTable").GetROProperty("innertext")
msgbox LTP
Regards,
Faisal
Reply
#3
Solved: 11 Years, 5 Months ago
Unfortunately I have tried that. It returns a blank msg box.
There is something else that I am missing. Can't figure it out.

Thanks for the reply
Reply
#4
Solved: 11 Years, 5 Months ago
Hi,
In your code i saw Webelement("WebTable") ?
Can you check the object in the object repository.

REgards
Sridhar
Reply
#5
Solved: 11 Years, 5 Months ago
See if this works:

(You might have to add the WebTable description, which is the child of the Frame1 object)

Code:
Set baseObj = Browser("Browser").Page("Page").Frame("Frame1").WebTable("")

rowCount = baseObj.GetRowWithCellText("Last Trade Price")
colCount = baseObj.ColumnCount(rowCount)

For iCount = 1 to colCount
    sData = baseObj.GetCellData(rowCount, colCount)
    If sData = "Last Trade Price" Then
        sText = Browser("Browser").Page("Page").Frame("Frame1").ChildItem(rowCount, colCount + 1, "WebElement", 0).GetROProperty("innertext")
    Exit For
    End If
Next

MsgBox sText
Reply
#6
Solved: 11 Years, 5 Months ago Smile 
Hi,

Thanks Sridhar, Anshoo & Faisal for ur replies.

I managed to trace the problem. I had written the wrong frame. The frame I was using was Frame1 but it was actually Frame2.

My mistake!!

Thanks again.
Reply
#7
Solved: 11 Years, 5 Months ago
yogendrasr, possibility of a dynamic frame object? Your initial record attempt resulted in "Frame1" and now it has changed to "Frame2". Just a thought.
Reply
#8
Solved: 11 Years, 5 Months ago
Hi Anshoo,

Nice thought!
The problem was there were three frames in that window. I selected "Frame1" but actually I should have chosen "Frame2".

They both had the same child objects.

Regards,
Yogendra
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Smile How to Select GetROproperty value in GUI sangitarm 2 4,695 10-15-2012, 11:52 PM
Last Post: agarwl.anurag
  GetROProperty help mv8167 1 2,790 06-26-2012, 11:53 PM
Last Post: supputuri
  GetROProperty error when used in a for loop JustLag 2 2,962 05-15-2012, 08:19 PM
Last Post: JustLag
  GetROProperty Getafix 1 6,350 08-23-2011, 07:16 PM
Last Post: Ankesh
  Generate Run time error on Allchkboxes(i).GetROProperty("all items") Langxii 1 3,647 07-06-2011, 09:34 AM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)