Jump to content

webdriver is not deleting the folder named scoped_* at the end of the execution with Edge Browser


Recommended Posts

Hello Team,

I am using webdriver with Edge browser, whenever script starts it will create temp file in the Temp folder(scoped_dir*), but once its shootdowns it will not delete those file automatically, its keep on creating and unnecessarily utilizing the HDD space. 

I am calling this function at the end of the script 

Func End_Browser()
    _WD_DeleteSession($Session)
    _WD_Shutdown($PID)
EndFunc   ;==>End_Browser

capabilities 

Func SetupEdge()
    _WD_Option('driver', "C:\Script_Resources\msedgedriver.exe")
    _WD_Option('port', 9515)
    _WD_Option('driverclose', True)
    _WD_Option('driverparams', '--verbose --log-path="' & @LocalAppDataDir & '\msedge.log"')
    $Desired_Capabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & _
            StringReplace(@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}'
EndFunc   ;==>SetupEdge

 

Edited by Jos
added codebox... please use <> when posting code
Link to comment
Share on other sites

@RohanMThis appears to be a timing issue where the webdriver console is closed via ProcessClose() before it has completed its cleanup process. I will open an issue on Github so that this can be reviewed / improved. In the mean time, you should be able to work around the issue by adding a call to Sleep() before _WD_Shutdown().

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...