realmtai / pywinauto

Automatically exported from code.google.com/p/pywinauto
Other
1 stars 0 forks source link

Why HwnWrapper.GetProperties retun Dict ?? #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Mark!!

thank you reply issue 1.

I try XMLHelper and it could use.

Please Teache me Quession.

XMLHelpers.WriteDialogToFile(filename, props )

props = must be type list.(ex [ { 'UserData', :0 } ]

example

#1
app.notepad.Menu().GetProperties() is return list.

but

#2
app.notepad.GetProperties() is retun dict

so, list = [dict ]

Why GetProperties retrun is dict Tyep?
Please teach the reason. and You have made a mistake the how and understanding 
my to use?

Dai

---
Issue transferred from OpenQa
Status:     Open Open
Assignee:   Mark Mc Mahon
Reporter:   Daisuke Yamashita

Original issue reported on code.google.com by mtnBikin...@gmail.com on 26 Aug 2010 at 2:24

GoogleCodeExporter commented 9 years ago
Mark Mc Mahon added a comment - 03/Apr/07 08:04 AM

Hi,

Sorry for the delay in looking into this. I just confirmed that 
Menu().GetProperties() returns a list - this is the bug. all GetProperties() 
methods should return dicts.

At the moment Menu().GetProperties() returns a list of dicts, each of these 
dicts is the GetProperties for a particular Menu Item.

At least I should make it consistent (even if I have no other items to add 
properties) e.g.
def GetProperties():
props = {}
props['Items'] = []
for item in self.Items():
props['Items'].append(item)
return props

Until I actually make this change will leave the bug open.
Remaining tasks are to verify that this change will not break anything else, 
and that there are no other properties I should be adding.

Thanks for the report,
Mark

Original comment by mtnBikin...@gmail.com on 26 Aug 2010 at 2:25