-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userdatadir so bigger #1102
Labels
question
Questions related to rod
Comments
Please add a valid generated by check-issue |
Restart your OS, or kill all chrome related processes, or use https://go-rod.github.io/#/custom-launch?id=remotely-manage-the-launcher |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After running for a long time, the user data file will become larger. How to delete this file after browser.stop using os.removel? Regardless of whether os. chmod ("path", 0777) is executed or not, it will still report "assessment is denied"; When using exec to delete a folder, it cannot be deleted, and cmd. run() does not report an error
use os.removeall:
err = os.chmod(userdatafile, 0777)
if err != nil {
log.Info("error infor:" + err.Error())
}
err = os.RemoveAll(userdatafile)
if err != nil {
log.Info("error infor:" + err.Error())
}
use exec:
//cmd := exec.Command("cmd", "/C", "rmdir", "/s", "/q", userdatafile)
//err = cmd.Run()
//if err != nil {
// log.Info("error infor:" + err.Error())
//}
The text was updated successfully, but these errors were encountered: