我使用下面的代碼:如何清理每個導航之間的緩存?
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腳本(與硒無關),這很醜陋。 –
感謝您的回答!現在我可以開始工作,知道我盡我所能使用硒! –