I need to use delete_all_cookies in my code. I have some concerns:
Do I need to place before opening the url
or before quit
Can anyone clarify the same? A lot of cache has been created during my test runs. My main objective is to clear cache in test server machine.
This depends to some degree on the browser you're using. If you are using a current version of Chrome or Firefox, deleting all cookies before starting testing won't make sense, as every driver instance will start with a separate, temporary profile without any cookies anyway.
Deleting all cookies after running the tests is equally unnecessary in those browsers, as the next test will start up with a clean profile again anyway. There only real scenario where deleting cookies makes sense is if you do multiple things in the same test (i.e., with the same driver instance) where you know that at some point the app sets a cookie that you don't want to be there at a later stage in the test. That's more of an edge case, though.
At which point should I place delete_all_cookies