Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screen scraping using mainframe coordinates versus using highlight edit/copy
#1
Not Solved
Good Morning.

We use QTP with our mainframe .net sessions. We copy fields, like policy numbers and account values using the Highlight drag, edit, copy feature. This process has to be adabpted to each person's screen session because they are all different sizes, even though the data appears in the same spot on the screen. What I would like to know if there is some vb code I can use to capture the coordinates of the screen to capture the same data, versus what are are currently using.

Here is a sample of the code we are currently using:
Code:
'stephen'
JavaWindow("Session A - A - TL5B0570").JavaObject("AccessibleScreenText").Click 322,47,"LEFT"
JavaWindow("Session A - A - TL5B0570").JavaObject("AccessibleScreenText").MouseDrag 322,47,509,47,"LEFT"
JavaWindow("Session A - A - TL5B0570").JavaMenu("Edit").JavaMenu("Copy").Select

This has to be adbpted for each persons computer and laptop using the script, so each person has to capture and change this twice.

Any help would be greatly appriciated.
Reply
#2
Not Solved
If size related to screen resolution then first you can get the screen resolutiion and then perform the rest of the actions.
Reply
#3
Not Solved
The purpose for this is to allow multiple people to use our scripts without having to record their own copy and paste based on thier screen settings. If we can find a way to capiture the fixed position on the screen, then we will be able to reuse our scripts without having each individual record their own copy and paste functionality. Please let me know if this is feasable.
Reply
#4
Not Solved
does the property of that control (on which you are working, that javaObject) uniquely identified by QTP in each session????

If it is, then i guess u will get the co-ordinate of that particular object in run time which is absolutely resolution interruption free....Whatever the resolution will be, it will return the x and y co-ordinate value on basis of that particular resolution where the run is going on.....after getting the co-ordinate in run time, then do click on that particular place......

i am giving u a sample code...hope it will work....And let me know whether ur problem got solved or not after this..........



Code:
Set obj = CreateObject ("Mercury.DeviceReplay")

absx =JavaWindow("Session A - A - TL5B0570").JavaObject("AccessibleScreenText").GetROProperty("abs_x")
    
absy =JavaWindow("Session A - A - TL5B0570").JavaObject("AccessibleScreenText").GetROProperty("abs_y")
    
obj.MouseMove absx, absy

obj.MouseClick absx, absy, 0



----------------
Thanx
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Capture All text from webpage and copy it... mpatra 3 4,897 07-25-2018, 05:33 PM
Last Post: vimlesh
  How to edit a text in aParagraph shaan.mishra87@gmail.com 2 2,360 08-26-2016, 04:48 PM
Last Post: shaan.mishra87@gmail.com
  Copy folders from ALM squadri 0 1,686 08-16-2016, 06:23 PM
Last Post: squadri
  Auto complete for Web Edit box branjitk 2 5,710 12-20-2014, 09:31 PM
Last Post: supputuri
  Highlight the Found text in Word/notepad Sivakumar2186@gmail.com 2 3,467 10-21-2013, 06:31 PM
Last Post: BadrinarayananR

Forum Jump:


Users browsing this thread: 2 Guest(s)