我使用下面的代码:如何清理每个导航之间的缓存?
string remoteAddress = "";
int timeout = 4;
DesiredCapabilities capabilities = DesiredCapabilities.InternetExplorer();
capabilities.SetCapability("ie.ensureCleanSession", true);
IWebDriver driver = new RemoteWebDriver(new Uri(remoteAddress), capabilities, TimeSpan.FromSeconds(timeout));
所以,当我开始即,它会清除缓存。我需要在每次导航之间清理它,而不关闭浏览器。可能吗?如果没有,我会保持这种方式,并放弃它。有时它似乎是在导航之间清理,有时不是...
我只需要确认它是否可能。
不可能。最近你正在运行类似Java的批处理文件或PowerShell脚本(与硒无关),这很丑陋。 –
感谢您的回答!现在我可以开始工作,知道我尽我所能使用硒! –