Open pcbt opened 4 years ago
Try upgrading to appium-python-client v.49, because it works all fine, haven't tested v.48 since there was a v.49 already out:
@classmethod
def tearDownClass(self):
if not args.keep and hasattr(self, 'driver'):
self.driver.quit()
self.driver = None
HTTP/1.1 200 OK
Content-Length: 76
Content-Type: application/json
{"sessionId":"E6C2DBED-90C4-4CAA-9DDE-3BC77A81C8BE","status":0,"value":true}
==========================================
DELETE /session/E6C2DBED-90C4-4CAA-9DDE-3BC77A81C8BE HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: appium/python 0.49 (selenium/3.141.0 (python windows))
HTTP/1.1 200 OK
Content-Length: 12
Content-Type: application/json
{"status":0}
i am using C# and NUnit, in my TearDown i just called driver.close(); then driver.quit(); and it's worked :)
Hi @fenchu ,
Why did you use this part:
@classmethod
def tearDownClass(self):
if not args.keep and hasattr(self, 'driver'):
self.driver.quit()
self.driver = None
It gives me this error:
if not args.keep and hasattr(self, 'app_session'):
NameError: name 'args' is not defined
By the way in my conda environment appium 0.49 is installed but WinAppDriver claims it is 0.48:
Hi @yotsubakoiwai ,
Python version also works, sometimes :)
Hi, I am using appium python client and unittest in my app_test.py file. Here is the teardown code:
session is desktop session (my app using splash screen so I am using desktop session to find it). app_session is obviously my app session. After test ran app is still open. Here is WinAppDriver console:
When I try to run tests again application quits immediately. Here is WinAppDriver console (continue from above):
I have three unittest methods in my test.py file and when I run them individually in VS Code; after first one ran the app quits, after second and third one ran the app does not quit. I checked WinAppDriver console for each unittest method but there is nothing different in the last commands which are DELETE commands given above. By the way this teardown code works in different test file with two unittest methods and application quits succesfully. What could be the reason?