Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can fetch a value from pop-up box
#1
Solved: 11 Years, 4 Months ago
I hav a pop-up message box in my application( web application )

   

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
Reply
#2
Solved: 11 Years, 4 Months ago
Have u tried using object-spy?
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months ago
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
Reply
#4
Solved: 11 Years, 4 Months ago
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)
Reply
#5
Solved: 11 Years, 4 Months ago
Can u please tell me how can use that in my problem?(I am new one with QTP)
Reply
#6
Solved: 11 Years, 4 Months ago
Code:
Temp_Text_Whole = Browser("dfsd:=dfs").Page("dfse:=ndj).Webtable("innertext:=     The .*).GetROProperty("innertext")
            Startpos = Instr(1,Temp_Text_Whole, "is:")
            endpos = (Instr(1,Temp_Text_Whole, "") - Startpos)
            Temp_Text_Mid = mid(Temp_Text_Whole, Startpos, endpos )
            Temp_Text_Id = trim(replace(Temp_Text_Mid , "ID: ", ""))
            Split_Temp_Text_Id=split(Temp_Text_Id ,":",-1,1)
            Temp_Text=Split_Temp_Text_Id(1)

msgbox (Temp_Text)

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
Reply
#7
Solved: 11 Years, 4 Months ago
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
dialogText =  Browser("window").Dialog("Microsoft Internet Explorer").GetVisibleText
End if

Hope this helps. Let me know.

Cheers,
Ram.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,527 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
Rolleyes QTP pop up window handling piyush8793 3 16,882 10-15-2015, 11:03 PM
Last Post: Venkateswarluponna
Exclamation Login & logout in Siebel and clicking pop-up button yuetling926 7 11,335 07-09-2014, 10:43 PM
Last Post: hhamilton
  select a date from pop-up calendar Dertjon 1 5,755 05-13-2014, 02:29 PM
Last Post: Ankur
  QTP not clicking on Yes button in the IE pop up dialog adityasrinivasb 2 9,623 09-29-2013, 11:01 PM
Last Post: prashantrawat101@gmail.com

Forum Jump:


Users browsing this thread: 1 Guest(s)