|
|
|
|
GetROProperty returns unexpected value
|
|
11-03-2011, 02:32 PM
Post: #1
|
|||
|
|||
|
GetROProperty returns unexpected value
Hi! I have a next question. I'd like to get an dynamic value from a webpage and then place it in in a serch field. So I am using the next: Code: UW_nummer = DataTable("UW_nummer", Global)=Browser("PegaRULES Process Commander").Page("PegaRULES Process Commander").Frame("FORMFRAME").WebElement("htmlTag:=TD","abs_x:=2097","abs_y:=389").GetROProperty("outertext")I've tryed also the next: GetROProperty("innertext"); WebTable instead WebElement, but result is still the same. I send some screenshots of situation. Thanx. |
|||
|
11-03-2011, 02:46 PM
Post: #2
|
|||
|
|||
|
RE: GetROProperty returns unexpected value
Hi Oleg,
Never use co-ordinates as a description for your object. Please add the object to Reporsitory and use regular expression.. finally u can use the below code.. 'Get the value UW_Number=Browser("PegaRULES Process Commander").Page("PegaRULES Process Commander").Frame("FORMFRAME").WebElement(<Name of the Object addedd to repository>).GetROProperty("innertext") 'Set the value Browser("PegaRULES Process Commander").Page("PegaRULES Process Commander").Frame("leftFrame").WebEdit("WebEdit").Set UW_Number Do let me know if u have any query. Regards, Ankesh |
|||
|
11-03-2011, 03:55 PM
Post: #3
|
|||
|
|||
|
RE: GetROProperty returns unexpected value
Try this,
Code: UW_nummer = DataTable("UW_nummer", Global)=Browser("PegaRULES Process Commander").Page("PegaRULES Process Commander").Frame("FORMFRAME").WebElement("htmlTag:=NOBR","abs_x:=2102","abs_y:=389").GetROProperty("outertext")Ravi |
|||
|
11-03-2011, 06:04 PM
(This post was last modified: 11-03-2011 06:13 PM by Oleg.)
Post: #4
|
|||
|
|||
RE: GetROProperty returns unexpected value
(11-03-2011 02:46 PM)Ankesh Wrote: Hi Oleg, Hi Ankesh, Thank you for your reaction. That is what I done: 1. Used WebTable instead of WebElement. 2. Changed the coordinates. I have to use them because the name of the element is not unique. 3. Changed 'outertext" to "innertext". The result is still the same. Thanks for your reaction as well, Ravi.Gju. Unfortunately it did not work either. This is the code I am trying to use now: Code: UW_nummer = DataTable("UW_nummer", Global)=Browser("PegaRULES Process Commander").Page("PegaRULES Process Commander").Frame("FORMFRAME").WebTable("htmlTag:=TABLE","abs_x:=1918","abs_y:=363").GetROProperty("innertext") Please look at the Run screen shoot as well (Onwaar = False in Dutch language ). What is also funny - in the search field I am getting value False - in English!May be you have other suggestions? |
|||
|
11-03-2011, 10:59 PM
Post: #5
|
|||
|
|||
RE: GetROProperty returns unexpected value
(11-03-2011 06:04 PM)Oleg Wrote:(11-03-2011 02:46 PM)Ankesh Wrote: Hi Oleg, Hi, Try this : Set oDesc=Description.Create() oDesc("micclass").value="WebTable" oDesc("class").value="repeatReadOnly" Set objColl=Browser().Page().Frame().ChildObjects(oDesc) cnt_tb=objColl.count For i=1 to cnt_tb no_cols=objColl.item(i).getroproperty("cols") If no_cols=2 Then data_tab=objColl.item(i).getcelldata(<row no>,<put here the column number in which ur data appear>) msgbox data_tab End If Next |
|||
|
11-04-2011, 12:51 PM
Post: #6
|
|||
|
|||
|
RE: GetROProperty returns unexpected value
Thank your for your help, parminderdhiman84.
I did as you advised: Code: Set oDesc=Description.Create()Probably I did something wrong... |
|||
|
11-04-2011, 02:29 PM
(This post was last modified: 11-04-2011 02:32 PM by parminderdhiman84.)
Post: #7
|
|||
|
|||
RE: GetROProperty returns unexpected value
(11-04-2011 12:51 PM)Oleg Wrote: Thank your for your help, parminderdhiman84. Hi, Please try replacing the above For Loop with one of the following for loops. One of them should work for u: For i=0 to cnt_tb-1 no_cols=objColl.item(i).getroproperty("cols") If no_cols=2 Then data_tab=objColl.item(i).getcelldata(3,2) msgbox data_tab End If Next or For i=0 to cnt_tb-1 no_cols=objColl(i).getroproperty("cols") If no_cols=2 Then data_tab=objColl(i).getcelldata(3,2) msgbox data_tab End If Next or For i=1 to cnt_tb no_cols=objColl(i).getroproperty("cols") If no_cols=2 Then data_tab=objColl(i).getcelldata(3,2) msgbox data_tab End If Next If still the error comes then could u debug to check that "cnt_tb" is returning any value or not. |
|||
|
11-04-2011, 02:43 PM
Post: #8
|
|||
|
|||
|
RE: GetROProperty returns unexpected value
Set oDesc=Description.Create()
oDesc("micclass").value="WebTable" oDesc("class").value="repeatReadOnly" Set objColl=Browser("PegaRULES Process Commander").Page("PegaRULES Process Commander").Frame("FORMFRAME").ChildObjects(oDesc) cnt_tb=objColl.count If (cnt_tb > 0) Then 'checking to see if the objColl.count > 0 For i=1 to cnt_tb no_cols=objColl.item(i).getroproperty("cols") If no_cols=2 Then data_tab=objColl.item(i).getcelldata(3,2) msgbox data_tab End If Next End If Try by adding other properties : oDesc(<other property>).value=<property value> till you get cnt_tb > 0 i.e. objColl.count > 0 (11-04-2011 12:51 PM)Oleg Wrote: Thank your for your help, parminderdhiman84. |
|||
|
11-04-2011, 03:11 PM
Post: #9
|
|||
|
|||
|
RE: GetROProperty returns unexpected value
Thanx a lot, parminderdhiman84!
It works perfect now. I used the first loop, only changing the row number. For i=0 to cnt_tb-1 no_cols=objColl.item(i).getroproperty("cols") If no_cols=2 Then data_tab=objColl.item(i).getcelldata(2,2) msgbox data_tab End If Next You saved my day .
|
|||
|
11-04-2011, 05:36 PM
Post: #10
|
|||
|
|||
|
RE: GetROProperty returns unexpected value
Hi parminderdhiman84.
Any idea as to why it was giving "onwaar" as the output. Regards, Ravi |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)
|
|

Search
Member List
Calendar
Help




). What is also funny - in the search field I am getting value False - in English!