GetROProperty returns unexpected value - 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 Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions) +--- Thread: GetROProperty returns unexpected value (/Thread-GetROProperty-returns-unexpected-value) Pages:
1
2
|
GetROProperty returns unexpected value - Oleg - 11-03-2011 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. RE: GetROProperty returns unexpected value - Ankesh - 11-03-2011 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.. Code: 'Get the value Do let me know if u have any query. Regards, Ankesh RE: GetROProperty returns unexpected value - ravi.gajul - 11-03-2011 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 RE: GetROProperty returns unexpected value - Oleg - 11-03-2011 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? RE: GetROProperty returns unexpected value - parminderdhiman84 - 11-03-2011 Hi, Try this : Code: Set oDesc=Description.Create() RE: GetROProperty returns unexpected value - Oleg - 11-04-2011 Thank your for your help, parminderdhiman84. I did as you advised: Code: Set oDesc=Description.Create() Probably I did something wrong... RE: GetROProperty returns unexpected value - parminderdhiman84 - 11-04-2011 Hi, Please try replacing the above For Loop with one of the following for loops. One of them should work for u: Code: For i=0 to cnt_tb-1 or Code: For i=0 to cnt_tb-1 or Code: For i=1 to cnt_tb If still the error comes then could u debug to check that "cnt_tb" is returning any value or not. RE: GetROProperty returns unexpected value - soumen - 11-04-2011 Code: Set oDesc=Description.Create() Try by adding other properties : Code: oDesc(<other property>).value=<property value> till you get cnt_tb > 0 i.e. objColl.count > 0 RE: GetROProperty returns unexpected value - Oleg - 11-04-2011 Thanx a lot, parminderdhiman84! It works perfect now. I used the first loop, only changing the row number. Code: For i=0 to cnt_tb-1 You saved my day . RE: GetROProperty returns unexpected value - ravi.gajul - 11-04-2011 Hi parminderdhiman84. Any idea as to why it was giving "onwaar" as the output. Regards, Ravi |