Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to identify controls embedded within WinListView cells
#1
Not Solved
I'm automating tests for a desktop application on Windows platform.
In a WinListView control which is used to display a multi-valued list(Each row in the list has four columns in it). After hovering on each row to select it, when mouse click operation is performed on any of the four cells the respective control in that cell shows up(an editbox or a dropdown list)
It seems that the developers have embedded temporary WinEdit and WinComboBox controls in the cells of each row which makes it difficult to use Object spy on them. I succeeded in getting object spy to work on those by holding control key, but the properties of those objects are not unique, for instance ComboBox in the third cell in different rows has the same properties.Posting ObjectSpy results here.

Quote:
Code:
**ComboBox in Row 1 Cell 3**
"Class Name:=WinComboBox",
"abs_x:=1041",
"abs_y:=551",
"all items:=Hours\nMinutes",
"attached text:=",
"enabled:=True",
"focused:=True",
"height:=21",
"hwnd:=7602202",
"items count:=2",
"nativeclass:=ComboBox",
"object class:=ComboBox",
"regexpwndclass:=ComboBox",
"regexpwndtitle:=Minutes",
"rightaligned:=False",
"righttoleftlayout:=False",
"righttoleftreading:=False",
"selection:=Minutes",
"text:=Minutes",
"visible:=True",
"width:=90",
"window id:=7988488",
"windowextendedstyle:=0",
"windowstyle:=1342177987",
"x:=354",
"y:=257"

Code:
**ComboBox in Row 5 cell 3**
"Class Name:=WinComboBox",
"abs_x:=1041",
"abs_y:=619",
"all items:=Hours\nMinutes",
"attached text:=",
"enabled:=True",
"focused:=True",
"height:=21",
"hwnd:=11601852",
"items count:=2",
"nativeclass:=ComboBox",
"object class:=ComboBox",
"regexpwndclass:=ComboBox",
"regexpwndtitle:=Minutes",
"rightaligned:=False",
"righttoleftlayout:=False",
"righttoleftreading:=False",
"selection:=Minutes",
"text:=Minutes",
"visible:=True",
"width:=90",
"window id:=7988488",
"windowextendedstyle:=0",
"windowstyle:=1342177987",
"x:=354",
"y:=325"

I have tried selecting rows using WinListView.GetItem but that gives hold of the first cell only which is an editbox and it works. For the remaining three columns I can't find any workaround. I have tried performing clicks using WinListView.GetItem().Select operation providing offset in pixels to click on each cell but that doesn't activates the embedded controls although I see the mouse moving and performing clicks when the test runs.
Record and play didn't provide much insight either as the play operation doesn't replicate the actions successfully every time and uses same and generic names for actions on cells of different rows.

Code:
WinListView("WinListView Name").WinEdit("Edit").Set "20"
DialogObject.WinComboBox("ComboBox").Select "Hours"
Reply
#2
Not Solved
At times it is difficult to get an answer without the app infront. However for the start, you may want to try options under Select Tools > Options > GUI Testing tab > Windows Applications 
   

and under Select Tools > Options > GUI Testing tab > Windows Applications >  Advanced
   
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved
Ankur _> At times it is difficult to get an answer without the app infront. However for the start, you may want to try options under Select Tools > Options > GUI Testing tab > Windows Applications 


and under Select Tools > Options > GUI Testing tab > Windows Applications >  Advanced


   

   

Hers are some screenshots.
Reply
#4
Not Solved
Please upload these images as attachments and then click "Insert Into Post"
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Not Solved
(04-09-2018, 07:01 PM)Ankur Wrote: Please upload these images as attachments and then click "Insert Into Post"

Please Check If these images help.
Reply
#6
Not Solved
(04-09-2018, 07:01 PM)Ankur Wrote: Please upload these images as attachments and then click "Insert Into Post"

I've uploaded the images as attachments, please check.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Access MS Excel Controls using QTP gayuamlu 0 2,197 06-13-2015, 02:06 AM
Last Post: gayuamlu
  DataGridTemplateColumn's cells cannot be edited... asaf_bitton 3 3,785 10-02-2014, 05:36 PM
Last Post: krupaluk
  Embedded Text on webpage srach84 1 2,771 07-28-2014, 07:35 AM
Last Post: Ankur
  Webtable().GetCellData() Returns hidden values of Cells ssvali 4 6,087 06-07-2013, 08:37 PM
Last Post: kawsar
  Retrieving default value from embedded webedit from webtable indranilgoswamimcb 1 3,154 01-12-2012, 02:47 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 2 Guest(s)