PS C:\Projects\RandomSpikes> & "C:/Program Files/Python39/python.exe" c:/Projects/RandomSpikes/WPFDebug.py c:\Projects\RandomSpikes\WPFDebug.py:26: DeprecationWarning: use driver.switch_to.window instead self.driver.switch_to_window(window_handle) test_context_switch (__main__.SimpleTest) ... ERROR test_initialize (__main__.SimpleTest) ... ERROR ====================================================================== ERROR: test_context_switch (__main__.SimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\Projects\RandomSpikes\WPFDebug.py", line 61, in test_context_switch contextList = self.driver.contexts File "C:\Program Files\Python39\lib\site-packages\appium\webdriver\extensions\context.py", line 40, in contexts return self.execute(Command.CONTEXTS)['value'] File "C:\Users\vinayj1\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Program Files\Python39\lib\site-packages\appium\webdriver\errorhandler.py", line 31, in check_response raise wde File "C:\Program Files\Python39\lib\site-packages\appium\webdriver\errorhandler.py", line 26, in check_response super().check_response(response) File "C:\Users\vinayj1\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: Command not recognized: GET: /session/21FC7F54-AFAC-4AB1-8B77-0868BA502C9A/contexts ====================================================================== ERROR: test_initialize (__main__.SimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\Projects\RandomSpikes\WPFDebug.py", line 48, in test_initialize self.driver.find_element_by_name("Chrome Legacy Window") File "C:\Users\vinayj1\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 496, in find_element_by_name return self.find_element(by=By.NAME, value=name) File "C:\Program Files\Python39\lib\site-packages\appium\webdriver\webdriver.py", line 414, in find_element return self.execute(RemoteCommand.FIND_ELEMENT, {'using': by, 'value': value})['value'] File "C:\Users\vinayj1\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Program Files\Python39\lib\site-packages\appium\webdriver\errorhandler.py", line 31, in check_response raise wde File "C:\Program Files\Python39\lib\site-packages\appium\webdriver\errorhandler.py", line 26, in check_response super().check_response(response) File "C:\Users\vinayj1\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters. ---------------------------------------------------------------------- Ran 2 tests in 22.124s FAILED (errors=2) PS C:\Projects\RandomSpikes>