Webdriver - Reset Safari
The error is appear when automation test on MAC with Safari browser some times.
About this error, we can reset safari resolve this problem every time, but after more and more times test case executed, the error will appeared once more.
Can we create a script to reset Safari every time before execute test or reset Safari at interval time?
Yes, we can use below commands to reset safari(Tested on OS x 10.9).
- rm ~/Library/Safari/History.plist
- rm ~/Library/Safari/Downloads.plist
- rm ~/Library/Safari/HistoryIndex.sk
- rm ~/Library/Safari/LastSession.plist
- rm ~/Library/Safari/TopSites.plist
- rm -rf ~/Library/Caches/com.apple.safari
- rm ~/Library/Safari/SearchProviders.plist.signed
rm ~/Library/Safari/History.plist
rm ~/Library/Safari/Downloads.plist
rm ~/Library/Safari/HistoryIndex.sk
rm ~/Library/Safari/LastSession.plist
rm ~/Library/Safari/TopSites.plist
rm -rf ~/Library/Caches/com.apple.safari
rm ~/Library/Safari/SearchProviders.plist.signed