Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Errors out before timeout to find a control not yet present with KeyError: 0 #31

Closed
akshaykochar opened this issue Mar 28, 2018 · 8 comments

Comments

@akshaykochar
Copy link

Traceback (most recent call last):
File "init.py", line 120, in wait_for_control
if control.Exists(search_wait_time, uiautomation.SEARCH_INTERVAL):
File "C:\Python27\Lib\site-packages\uiautomation\uiautomation.py", line 2424, in Exists
control = FindControl(self.searchFromControl, self._CompareFunction, self.searchDepth, False, self.foundIndex)
File "C:\Python27\Lib\site-packages\uiautomation\uiautomation.py", line 4299, in FindControl
for child, depth in WalkControl(control, findFromSelf, maxDepth):
File "C:\Python27\Lib\site-packages\uiautomation\uiautomation.py", line 4185, in WalkControl
child = lastControl.GetFirstChildControl()
File "C:\Python27\Lib\site-packages\uiautomation\uiautomation.py", line 2670, in GetFirstChildControl
return Control.CreateControlFromElement(comEle)
File "C:\Python27\Lib\site-packages\uiautomation\uiautomation.py", line 2790, in CreateControlFromElement
return ControlDictcontrolType

@akshaykochar
Copy link
Author

The control has not yet been generated. The library should wait until timeout expires to search for control right?

@yinkaisheng
Copy link
Owner

Please update the code and try again.

@akshaykochar
Copy link
Author

Ok I will try it tomorrow and let you know. Thanks.

@akshaykochar
Copy link
Author

@yinkaisheng What do you mean by update the code?

@akshaykochar
Copy link
Author

Do you have a release?

@akshaykochar
Copy link
Author

@yinkaisheng build the code, the fix seems to work.

@akshaykochar
Copy link
Author

Will you do a pip release for this?

@yinkaisheng
Copy link
Owner

Just the git code.
I'll upload the package to pypi today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants