Micro Focus QTP (UFT) Forums
Capturing the WinEdit text in QTP10.0 on Win7 - 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: Capturing the WinEdit text in QTP10.0 on Win7 (/Thread-Capturing-the-WinEdit-text-in-QTP10-0-on-Win7)

Pages: 1 2


Capturing the WinEdit text in QTP10.0 on Win7 - joe.venom13 - 12-28-2010

Hi,

I am using QTP 10.0 on Windows 7...

I am having difficulty in capturing the text in the "WinEdit" object.
Like the text in the sample application: Flight in QTP
I need to capture the "Flight No.", "Departure Time:"... etc... all of these are non-editable...

Thanks in Advance...
Joe


RE: Capturing the WinEdit text in QTP10.0 on Win7 - manishbhalshankar - 12-28-2010

Hi Joe,

Try output checkpoints or GetROProperty.


RE: Capturing the WinEdit text in QTP10.0 on Win7 - joe.venom13 - 12-28-2010

Thank u for the reply... but i m facing the same problem...

I have tried the following code but i m unable to pickup the text
Code:
Code:
Window("Flight Reservation").WinEdit("Flight No:").GetROProperty()



RE: Capturing the WinEdit text in QTP10.0 on Win7 - Saket - 12-28-2010

GetROProperty needs the Property to retrieve from the object, you should pass the property like text, value etc to get the value from your winedit object. Window("Flight Reservation").WinEdit("Flight No:").GetROProperty("text") should work here.



RE: Capturing the WinEdit text in QTP10.0 on Win7 - joe.venom13 - 12-28-2010

Hi Saket,
I am trying to capture the text in the WinEdit object and copy it to the Excel sheet... I have copied the WinComboBox object but i am facing a problem with WiEdit...

I am facing the following error:
"Cannot identify the object "Flight No:" (of class WinEdit). Verify that this object's properties match an object currently displayed in your application.

Line (38):
Code:
"objWorkbook.Sheets("Sheet1").Cells(i,4).Value = Window("Flight Reservation").WinEdit("Flight No:").GetROProperty("text")".
Tip: If the objects in your application have changed, the Maintenance Run Mode can
help you identify and update your steps and/or the objects in your repository."

Please advise.


RE: Capturing the WinEdit text in QTP10.0 on Win7 - Saket - 12-28-2010

as the error states - Check if the object is in your repository, try to highlight the object. if not then updating your object should solve the issue.


RE: Capturing the WinEdit text in QTP10.0 on Win7 - joe.venom13 - 12-28-2010

Please find attached the screenshot... The WinEdit object is in the object repository...

Please advise.


RE: Capturing the WinEdit text in QTP10.0 on Win7 - Saket - 12-28-2010

try below code and let me know the results

Code:
Window("Flight Reservation").WinEdit("Flight No:").highlight



RE: Capturing the WinEdit text in QTP10.0 on Win7 - joe.venom13 - 12-28-2010

the following error occured on trying the above code:

General run error.

Line (38):
Code:
"objWorkbook.Sheets("Sheet1").Cells(i,4).Value = Window("Flight Reservation").WinEdit("Flight No:").highlight".



RE: Capturing the WinEdit text in QTP10.0 on Win7 - BVVPrasad - 12-28-2010

Hi Joe

Can you remove the object present in the object repository, leart it again and try running the code.

Regards,
Prasad