Jump to content

Recommended Posts

Posted

I have a question:

Can we somehow use "window.chrome.webview" from the WebDriver + JavaScript level and will there be any benefits from it?

 

Related information:

 https://github.com/MicrosoftEdge/WebView2Announcements/issues/61

  Quote

We have published API reference for window.chrome.webview JavaScript APIs which you can use along with native WebView2 APIs to communicate between native code and web code.

Please leave any feedback in our WebView2Feedback repo. Thanks!

Expand  

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Thanks for answer.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Hello.

I have an issue and can't figure out where is the point.

Here is my code:

#include-once
#include "Include\wd_capabilities.au3" ; https://www.autoitscript.com/wiki/WebDriver
#include "Include\wd_helper.au3" ; https://www.autoitscript.com/wiki/WebDriver

Local $bWDIsStarted = False, $bEdgeIsRunning =  False, $bSKRnDSiteIsOpened = False

_EdgeStart()

_EdgeClose()

Func _SetupEdge()
    Local $sDriverPath = @ScriptDir & "\bin\"
    If @OSArch = "X64" Or @OSArch = "IA64" Then
        $sDriverPath &= "msedgedriver_win64.exe"
    ElseIf @OSArch = "X86" Then
        $sDriverPath &= "msedgedriver_win32.exe"
    EndIf

    _WD_Option('Driver', $sDriverPath)
    _WD_Option('Port', 9515)
    If _GetPref ("bSK_EnableWebDriverLog") = 1 Then _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"') ; ведение лога
    _WD_CapabilitiesStartup()
    _WD_CapabilitiesAdd('alwaysMatch', 'msedge')
    _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation')
    _WD_CapabilitiesAdd('args', '--inprivate')
    _WD_CapabilitiesAdd('args', 'user-data-dir=' & StringReplace(_GetPref("SK_EdgeDataDir"), "\", "\\"))
    _WD_CapabilitiesAdd('args', 'profile-directory=Default')
    If _GetPref("bSK_Run_Browser_Headless") = 1 Then _WD_CapabilitiesAdd('args', '--headless')
    _WD_CapabilitiesDump(@ScriptLineNumber) ; dump current Capabilities setting to console - only for testing in this demo
    Local $sCapabilities = _WD_CapabilitiesGet()
    Return $sCapabilities
EndFunc ;==>_SetupEdge


Func _GetPref ($sPref)
    If $sPref = "bSK_EnableWebDriverLog" Then
        Return 1
    ElseIf $sPref = "bSK_Run_Browser_Headless" Then
        Return 0
    ElseIf $sPref = "SK_EdgeDataDir" Then
        Return @ScriptDir & "\Edge_data"
    ElseIf $sPref = "URL" Then
        Return "https://www.google.com/"
    EndIf
EndFunc ; _GetPref

Func _EdgeStart()
;~  $_WD_DEBUG = $_WD_DEBUG_None ; закомментить при отладке
    Local $sDesiredCapabilities = _SetupEdge()
    Global $iWebDriver_PID = _WD_Startup()
    If $iWebDriver_PID <> 0 Then
        $bWDIsStarted = True
        Global $sSession = _WD_CreateSession($sDesiredCapabilities)
        If $sSession <> "" Then
            $bEdgeIsRunning =  True
            _WD_Navigate($sSession, _GetPref("URL"))
            _WD_LoadWait($sSession)
            Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[1]/div[3]/form/div[1]/div[1]/div[4]/center/input[2]")
            If @error = $_WD_ERROR_Success Then $bSKRnDSiteIsOpened = True
        EndIf
    EndIf
EndFunc ;_EdgeStart()

Func _EdgeClose()
    If $bSKRnDSiteIsOpened Then
        $bSKRnDSiteIsOpened = False
    EndIf
    If $bEdgeIsRunning Then
        _WD_DeleteSession($sSession)
        $bEdgeIsRunning = False
    EndIf
    If $bWDIsStarted Then
        _WD_Shutdown($iWebDriver_PID)
        $bWDIsStarted = False
    EndIf
EndFunc ;_EdgeClose()

 

It works great if I run it from Scite (launches Edge, navigates to https://www.google.com/ , waits for element and then closes browser).

But if i run compiled version, it launches Edge and afer that (it seems to me) driver loose connection to Edge. Nothing else happens - neither navigating to https://www.google.com/ , nor closing browser.

 

Last few lines in log file:

[1677229307.181][INFO]: Launching Microsoft Edge: "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --allow-pre-commit-input --disable-background-networking --disable-backgrounding-occluded-windows --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-blink-features=ShadowDOMV0 --enable-logging --inprivate --log-level=0 --no-first-run --no-service-autorun --password-store=basic --profile-directory=Default --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir="D:\\Projects\\AutoIt\\REC\\Project_2\\src\\Edge_data"
[1677229308.234][INFO]: [56534bb3c01549333e8eb8db189bf08d] RESPONSE InitSession ERROR unknown error: Microsoft Edge failed to start: was killed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so msedgedriver is assuming that msedge has crashed.)
[1677229308.234][DEBUG]: Log type 'driver' lost 0 entries on destruction
[1677229308.234][DEBUG]: Log type 'browser' lost 0 entries on destruction

Could you help me with this issue, please?
 

Edited by Tipulatoid
Posted
  On 2/24/2023 at 9:12 AM, Tipulatoid said:

It works great if I run it from Scite (launches Edge, navigates to https://www.google.com/ , waits for element and then closes browser).

But if i run compiled version, it launches Edge and afer that (it seems to me) driver loose connection to Edge. Nothing else happens - neither navigating to https://www.google.com/ , nor closing browser.

Expand  

I haven't tried your code yet, but I wonder if there is something different in the environment, such as working directory, when running the compiled version.

  On 2/24/2023 at 9:12 AM, Tipulatoid said:

[1677229308.234][INFO]: [56534bb3c01549333e8eb8db189bf08d] RESPONSE InitSession ERROR unknown error: Microsoft Edge failed to start: was killed.   (unknown error: DevToolsActivePort file doesn't exist)

Expand  

What versions of MSEdge and Edgedriver are you running? I've seen this error discussed previously on the net, but I don't recall the solution off hand.

Posted
  On 2/24/2023 at 12:12 PM, Danp2 said:

I haven't tried your code yet, but I wonder if there is something different in the environment, such as working directory, when running the compiled version.

Expand  

I run exe file from the same folder where au3 is.

 

  On 2/24/2023 at 12:12 PM, Danp2 said:

What versions of MSEdge and Edgedriver are you running? I've seen this error discussed previously on the net, but I don't recall the solution off hand.

Expand  

Microsoft Edge 110.0.1587.50

Microsoft Edge WebDiver 110.0.1587.49

 

Posted (edited)

Give us Capabilities dump from non compiled and compiled version.

Focus on 32/64 bitness issues especially on:

Local $sDriverPath = @ScriptDir & "\bin\"
    If @OSArch = "X64" Or @OSArch = "IA64" Then
        $sDriverPath &= "msedgedriver_win64.exe"
    ElseIf @OSArch = "X86" Then
        $sDriverPath &= "msedgedriver_win32.exe"
    EndIf

and try to force 32/64 bit AutoIt for both compilled not compiled version with:

#AutoIt3Wrapper_UseX64=N

Check each scenario.
 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

webdriver_noncompiled_x32_driver_used_msedgedriver_win64.exe_script_compiled_as_not_compiled.log

_WD_Option ==> Success [0] : Parameters:   Option=console   Value=webdriver_noncompiled_x32_driver_used_msedgedriver_win64.exe_script_compiled_as_not_compiled.log
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: msedge
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesDump: JSON structure starts below: 46
{
    "capabilities":{
        "alwaysMatch":{
            "ms:edgeOptions":{
                "excludeSwitches":[
                    "enable-automation"
                ],
                "args":[
                    "--inprivate",
                    "user-data-dir=D:\\\\Projects\\\\AutoIt\\\\REC\\\\Project_2\\\\src\\\\Edge_data",
                    "profile-directory=Default"
                ]
            }
        }
    }
}
_WD_CapabilitiesDump: JSON structure ends above.
_WD_GetFreePort ==> Success [0] : 9515
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 WIN32_NT 19045 
_WD_Startup: AutoIt:    3.3.16.1
_WD_Startup: Webdriver UDF: 0.12.0 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe" --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Success [0] : HTTP status = 200
_WD_CreateSession ==> Success [0] : ac5e9d8b45f99cf3a6f88948e5999a75
__WD_Post ==> Success [0] : HTTP status = 200
_WD_Navigate ==> Success [0] : Parameters:   URL=https://www.google.com/
_WD_LoadWait ==> Success [0 / 4] : Parameters:    Delay=Default    Timeout=Default    Element=Default    DesiredState=complete    : ReadyState= complete (Fully loaded)
__WD_Post ==> Success [0] : HTTP status = 200
_WD_FindElement ==> Success [0] : Parameters:   Strategy=xpath   Selector=/html/body/div[1]/div[3]/form/div[1]/div[1]/div[4]/center/input[2]   StartNodeID=Default   Multiple=Default   ShadowRoot=Default
__WD_Delete ==> Success [0] : HTTP status = 200
_WD_DeleteSession ==> Success [0] : WebDriver session deleted

webdriver_noncompiled_x32_driver_used_msedgedriver_win32.exe_script_compiled_as_not_compiled.log

_WD_Option ==> Success [0] : Parameters:   Option=console   Value=webdriver_noncompiled_x32_driver_used_msedgedriver_win32.exe_script_compiled_as_not_compiled.log
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: msedge
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesDump: JSON structure starts below: 46
{
    "capabilities":{
        "alwaysMatch":{
            "ms:edgeOptions":{
                "excludeSwitches":[
                    "enable-automation"
                ],
                "args":[
                    "--inprivate",
                    "user-data-dir=D:\\\\Projects\\\\AutoIt\\\\REC\\\\Project_2\\\\src\\\\Edge_data",
                    "profile-directory=Default"
                ]
            }
        }
    }
}
_WD_CapabilitiesDump: JSON structure ends above.
_WD_GetFreePort ==> Success [0] : 9515
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 WIN32_NT 19045 
_WD_Startup: AutoIt:    3.3.16.1
_WD_Startup: Webdriver UDF: 0.12.0 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe (32 Bit)
_WD_Startup: Params:    --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe" --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Success [0] : HTTP status = 200
_WD_CreateSession ==> Success [0] : e18db0a381bcb9f1f44d30babc1d407c
__WD_Post ==> Success [0] : HTTP status = 200
_WD_Navigate ==> Success [0] : Parameters:   URL=https://www.google.com/
_WD_LoadWait ==> Success [0 / 4] : Parameters:    Delay=Default    Timeout=Default    Element=Default    DesiredState=complete    : ReadyState= complete (Fully loaded)
__WD_Post ==> Success [0] : HTTP status = 200
_WD_FindElement ==> Success [0] : Parameters:   Strategy=xpath   Selector=/html/body/div[1]/div[3]/form/div[1]/div[1]/div[4]/center/input[2]   StartNodeID=Default   Multiple=Default   ShadowRoot=Default
__WD_Delete ==> Success [0] : HTTP status = 200
_WD_DeleteSession ==> Success [0] : WebDriver session deleted

 

webdriver_compiled_x32_driver_used_msedgedriver_win64.exe_script_compiled_as_x86.log

_WD_Option ==> Success [0] : Parameters:   Option=console   Value=webdriver_compiled_x32_driver_used_msedgedriver_win64.exe_script_compiled_as_x86.log
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: msedge
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesDump: JSON structure starts below: -1
{
    "capabilities":{
        "alwaysMatch":{
            "ms:edgeOptions":{
                "excludeSwitches":[
                    "enable-automation"
                ],
                "args":[
                    "--inprivate",
                    "user-data-dir=D:\\\\Projects\\\\AutoIt\\\\REC\\\\Project_2\\\\src\\\\Edge_data",
                    "profile-directory=Default"
                ]
            }
        }
    }
}
_WD_CapabilitiesDump: JSON structure ends above.
_WD_GetFreePort ==> Success [0] : 9515
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 WIN32_NT 19045 
_WD_Startup: AutoIt:    3.3.16.1
_WD_Startup: Webdriver UDF: 0.12.0 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe" --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Webdriver Exception [10] : HTTP status = 500
_WD_CreateSession ==> Webdriver Exception [10]

 

webdriver_compiled_x32_driver_used_msedgedriver_win32.exe_script_compiled_as_x86.log

_WD_Option ==> Success [0] : Parameters:   Option=console   Value=webdriver_compiled_x32_driver_used_msedgedriver_win32.exe_script_compiled_as_x86.log
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: msedge
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesDump: JSON structure starts below: -1
{
    "capabilities":{
        "alwaysMatch":{
            "ms:edgeOptions":{
                "excludeSwitches":[
                    "enable-automation"
                ],
                "args":[
                    "--inprivate",
                    "user-data-dir=D:\\\\Projects\\\\AutoIt\\\\REC\\\\Project_2\\\\src\\\\Edge_data",
                    "profile-directory=Default"
                ]
            }
        }
    }
}
_WD_CapabilitiesDump: JSON structure ends above.
_WD_GetFreePort ==> Success [0] : 9515
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 WIN32_NT 19045 
_WD_Startup: AutoIt:    3.3.16.1
_WD_Startup: Webdriver UDF: 0.12.0 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe (32 Bit)
_WD_Startup: Params:    --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe" --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Webdriver Exception [10] : HTTP status = 500
_WD_CreateSession ==> Webdriver Exception [10]

 

webdriver_compiled_x64_driver_used_msedgedriver_win64.exe_script_compiled_as_x64.log

_WD_Option ==> Success [0] : Parameters:   Option=console   Value=webdriver_compiled_x64_driver_used_msedgedriver_win64.exe_script_compiled_as_x64.log
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: msedge
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesDump: JSON structure starts below: -1
{
    "capabilities":{
        "alwaysMatch":{
            "ms:edgeOptions":{
                "excludeSwitches":[
                    "enable-automation"
                ],
                "args":[
                    "--inprivate",
                    "user-data-dir=D:\\\\Projects\\\\AutoIt\\\\REC\\\\Project_2\\\\src\\\\Edge_data",
                    "profile-directory=Default"
                ]
            }
        }
    }
}
_WD_CapabilitiesDump: JSON structure ends above.
_WD_GetFreePort ==> Success [0] : 9515
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 WIN32_NT 19045 
_WD_Startup: AutoIt:    3.3.16.1
_WD_Startup: Webdriver UDF: 0.12.0 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win64.exe" --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Webdriver Exception [10] : HTTP status = 500
_WD_CreateSession ==> Webdriver Exception [10]

 

webdriver_compiled_x64_driver_used_msedgedriver_win32.exe_script_compiled_as_x64.log

_WD_Option ==> Success [0] : Parameters:   Option=console   Value=webdriver_compiled_x64_driver_used_msedgedriver_win32.exe_script_compiled_as_x64.log
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: msedge
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesDump: JSON structure starts below: -1
{
    "capabilities":{
        "alwaysMatch":{
            "ms:edgeOptions":{
                "excludeSwitches":[
                    "enable-automation"
                ],
                "args":[
                    "--inprivate",
                    "user-data-dir=D:\\\\Projects\\\\AutoIt\\\\REC\\\\Project_2\\\\src\\\\Edge_data",
                    "profile-directory=Default"
                ]
            }
        }
    }
}
_WD_CapabilitiesDump: JSON structure ends above.
_WD_GetFreePort ==> Success [0] : 9515
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 WIN32_NT 19045 
_WD_Startup: AutoIt:    3.3.16.1
_WD_Startup: Webdriver UDF: 0.12.0 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe (32 Bit)
_WD_Startup: Params:    --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "D:\Projects\AutoIt\REC\Project_2\src\bin\msedgedriver_win32.exe" --verbose --log-path="D:\Projects\AutoIt\REC\Project_2\src\msedge.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Webdriver Exception [10] : HTTP status = 500
_WD_CreateSession ==> Webdriver Exception [10]

 

Edited by Tipulatoid
Posted

I have already switched to Firefox portable in my script, which works great.
So, investigation of this issue is mostly for curiosity for me.
And I want to thank authors of this great UDF.  It is outstanding.

Posted
  On 2/25/2023 at 2:53 AM, Tipulatoid said:

I want to thank authors of this great UDF.  It is outstanding.

Expand  

We are still working on new features :)

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 2/25/2023 at 2:46 AM, Tipulatoid said:

....
webdriver_noncompiled_x32_driver_used_msedgedriver_win64.exe_script_compiled_as_not_compiled.log
....
webdriver_noncompiled_x32_driver_used_msedgedriver_win32.exe_script_compiled_as_not_compiled.log
....

webdriver_compiled_x64_driver_used_msedgedriver_win32.exe_script_compiled_as_x64.log
.....

Expand  

Do us a favor and save all this *.log to text file and zip them together, after that attach them here.
We are busy, and sometimes lazy and we would not do this by our self.

When we will have them as a file then it will be easy to compare them with https://winmerge.org/

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 2/25/2023 at 2:46 PM, Danp2 said:

@TipulatoidSome questions for you --

  • Any chance this could be a rights issue?
  • Is the D drive a local or network drive?
  • How are you launching the compiled script?
  • Have you tried running as Administrator?
Expand  

Wow! You are looking at the root (if it is correct to say in English)!
I use Far Manager , which I love for its good old interface in style of Norton Commander and other possibilities.
I always launch Far Manager with Admin rights, then I select exe file in it with arrow keys and hit enter. 
Now I tried to launch my compiled script from Windows explorer without admin rights - and it did all I want - opened google.com and then closed the browser! I also tried to launch it from Far Manager without Admin rights - and it worked too! I couldn't even imagine that this might be a point!

So, the conclusion is that my compiled script doesn't work if it is launched with admin rights.

As for question #2, drive D is local one.

Thank you so much!

Edited by Tipulatoid
Posted
  On 2/27/2023 at 5:04 PM, duke241 said:

Hi everybody, I have a question. How to delete an element? (Delete, not hide). I can't find a function in Webdriver UDF to do that.

Expand  

I lost my sight, I lost my sight.

Can you please do not use such font to ask questions ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I highly suggest that whenever you can't find a way to do something with WebDriver UDF, you check JavaScript, then use the UDF to execute your JS ;)

In this case, I'd take a look at Element.remove()

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

  Reveal hidden contents
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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