How can fetch a value from pop-up box - 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: How can fetch a value from pop-up box (/Thread-How-can-fetch-a-value-from-pop-up-box) |
How can fetch a value from pop-up box - aditya - 01-22-2008 I hav a pop-up message box in my application( web application ) [attachment=2] This is the pop-Up box and the count is dynamically generated one . I want to fetch the count value(ie it is '7' in the above message) by using QTP and need to store it in a variable...How can i do that Thanks in advance RE: How can fetch a value from pop-up box - Ankur - 01-22-2008 Have u tried using object-spy? RE: How can fetch a value from pop-up box - Rajashekar Gouda - 01-22-2008 There are two ways. If u r using recording methods then pls use the our put values. If ur working with DP then pls use GetROproperty() Reference code for Output CheckPoint Code: Browser("sedfs").Window("dfsfs").Output CheckPoint("Please Select the") Reference code for GetROproperty. Code: Nou=Browser("sedfs:=dfsw").Window("dfsfs:=dfs").GetROproperty("text:=7") Please let me know the result Regards Raj RE: How can fetch a value from pop-up box - aditya - 01-22-2008 how can i fetch the count from that entire message ie ...Count is always changing if now it is 7 then next time it will b 9 or 10 ... what i need is i need to store the count into one variable... ie I need a=(Query count) RE: How can fetch a value from pop-up box - aditya - 01-22-2008 Can u please tell me how can use that in my problem?(I am new one with QTP) RE: How can fetch a value from pop-up box - Rajashekar Gouda - 01-22-2008 Code: Temp_Text_Whole = Browser("dfsd:=dfs").Page("dfse:=ndj).Webtable("innertext:= The .*).GetROProperty("innertext") This code will capture entire line starting from "The" of the "The count for this is 7" and then it will trim to get the "Number" it may be 7 or 10 or even 100 Pls let me know the result Regards Raj RE: How can fetch a value from pop-up box - vramu1 - 01-23-2008 Aditya, You can try like this to get the text from the popup box and then you can trim to get your desire value. Code: If Browser("window").Dialog("Microsoft Internet Explorer").Exist Then Hope this helps. Let me know. Cheers, Ram. |