https://www.fleekitsolutions.com/use-winapp-driver-python/
https://github.com/appium/appium-windows-driver#windowsdriver-specific-capabilities
When it's a portable application, or when there's no ID of the application. Put the application file under the project working directory.
Get the root directory of the project
https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure/45944002
Using Inspect.exe to locate elements
Auto launch WinAppDriver (kill process if it exists) -> Run test scripts -> kill WinAppDriver process after tests finish
http://appium.io/docs/en/commands/element/find-element/
To locate elements by its AutomationId on Inspect.exe, use:
https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip
Solution:
upgrade all installed pip packages
When locating elements of a new window after window changes
https://stackoverflow.com/questions/10629815/how-to-switch-to-new-window-in-selenium-for-python
https://github.com/microsoft/WinAppDriver/issues/375
Solution:
Get all windows of the application, and check how many windows exist:
Check if the current window is different from the previous window.
If there is only one window after window switch, print the address of the window to check:
Get the current window again, and set focus to the window (If there's only one window after window switching):
Switch to the target window (If there are many windows):
Use Pytest setup and teardown and get all windows, close all windows in the teardown function
Add try catch and finally in the try catch function, call quit() in the finally block
winappdriver
python
test automation
software test