Jump to content

Recommended Posts

Posted (edited)

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
Posted

@Danp2

yes, your suggestion worked, I added Sleep before _WD_Shutdown(). thank you @Danp2 

_WD_DeleteSession($Session)
  Sleep(8000)
_WD_Shutdown()

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
  • Recently Browsing   0 members

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