According to this page you can clear the cookies by creating a new CookieContainer and assigning it to the web test context. Thus overwriting the unwanted (container of) cookies with a new empty container.
In a Coded web test the code would be:
this.Context.CookieContainer = new System.Net.CookieContainer();
In a plugin the code would be:
e.WebTest.Context.CookieContainer = new System.Net.CookieContainer();
Asked in February 2016Viewed 2,327 timesVoted 12Answered 1 times