Assert exists on focused window
After switching from Sikuli method for Unit Testing to python's unittest, I am beginning to receive this error when asserting that an image exists within a focusedWindow.
Example Code:
window = App.focusedWindow()
assert window.
Error Message:
AttributeError: 'NoneType' object has no attribute 'exists'
Any ideas why I am now getting this error but not previously?
What would be the best method for checking if an image exists within a focusedWindow?
Note: I am looking on the focusedWindow because that window could load at any location of screen so defining a set region x, y, etc would not always be accurate.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Erisu B for more information if necessary.