MRAJ Posted April 11, 2023 Share Posted April 11, 2023 Hello, AutoIt Version : v3.3.14.5 WDVERSION = "0.8.1" I am using webdriver UDF using Edge Browser. Actually when i run the script it is giving me the error as below in edge browser, but when i run manually it is opening fine in IE mode without any issue. Please suggest The connection for this site is not secure" Unsupported protocol The client and server don't support a common SSL protocol version or cipher suite. Link to comment Share on other sites More sharing options...
Danp2 Posted April 11, 2023 Share Posted April 11, 2023 You should post a short script that we can run to reproduce the problem. Otherwise, we can only guess at the reason for this issue. P.S. Have you tried running your script while utilizing your existing user profile? See the wiki for details on how to do this if you are unsure. P.P.S. You are running a very old version of the Webdriver UDF. Time to update if you want further support. 😉 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted April 13, 2023 Author Share Posted April 13, 2023 Actaullu all scripts are working fine edge with IE mode..but only this website is showing the error while running script, but manually it is opening without any issue. i posted output of the debug logs. _WD_IsLatestRelease: _WD_IsLatestRelease ==> Success _WD_Startup: OS: WIN_2016 WIN32_NT 17763 _WD_Startup: AutoIt: 3.3.14.5 _WD_Startup: WD.au3: 0.4.1.1 (Update available) _WD_Startup: WinHTTP: 1.6.4.2 _WD_Startup: Driver: msedgedriver.exe _WD_Startup: Params: --verbose _WD_Startup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": ["enable-automation"]}}}} __WD_Post: StatusCode=200; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"msedge","browserVersion":"112.0... _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"msedge","browserVersion":"112.0.1722.39","ms:edgeOptions":{"debuggerAddress":"localhost:50662"},"msedge":{"msedgedriverVersion":"112.0.1722.34 (649b7446f96f116d8dc7d1c2d92d06583649e244)","userDataDir":"C:\\Users"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:extension:credBlob":true,"webauthn:extension:largeBlob":true,"webauthn:extension:minPinLength":true,"webauthn:extension:prf":true,"webauthn:virtualAuthenticators":true},"sessionId":"77ccf8a0acceb95e627bf1681c13c31f"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/77ccf8a0acceb95e627bf1681c13c31f/url; $sData={"url":"sampleurl"} __WD_Post: StatusCode=500; ResponseText={"value":{"error":"unknown error","message":"unknown error: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH\... __WD_Post ==> Webdriver Exception: {"value":{"error":"unknown error","message":"unknown error: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH\n (Session info: MicrosoftEdge=112.0.1722.39)" Please also send me the updated webdriver link. Link to comment Share on other sites More sharing options...
Danp2 Posted April 13, 2023 Share Posted April 13, 2023 The Webdriver UDF is being actively developed / updated to provide better functionality and compatibility with the W3C specs. If you want my continuing support, then you must be running a recent release of the UDF. You are currently around 18 months behind and will need to upgrade to v0.13.0 before I will be willing to provide further assistance. Also, you may want to go back and reread the P,S. from my prior post as it may contain the solution to your problem but you appear to have ignored it. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mLipok Posted April 13, 2023 Share Posted April 13, 2023 (edited) https://github.com/Danp2/au3WebDriver/archive/refs/tags/0.13.0.zip and https://github.com/dragana-r/autoit-winhttp/releases/download/1.6.4.1/1.6.4.1.zip Edited April 13, 2023 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 Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MRAJ Posted April 13, 2023 Author Share Posted April 13, 2023 Hello Dan, I updated the webdriver but it is now not opening webdriver nor edge brwoser. Attached is the script. Let me know if anywhere i am wrong. expandcollapse popup#include "wd_core.au3" #include "wd_helper.au3" #include "wd_capabilities.au3" $_WD_DEBUG = $_WD_DEBUG_None ; Could also use $_WD_DEBUG_Error $_WD_DEBUG = $_WD_DEBUG_Info ; Gives you the greatest level of details _WD_Option('console', @ScriptDir & "\wdudf.log") Local $bHeadless,$sSession, $sElement,$sCapabilities SetupEdge($bHeadless) _WD_CapabilitiesStartup() Sleep(10000) $sSession = _WD_CreateSession() _WD_Navigate($sSession,"URL") _WD_Window($sSession,"maximize") _WD_LoadWait($sSession) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@id='details-button']") _WD_ElementAction($sSession,$sElement,'click') ;Sleep(10000) _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupEdge($bHeadless) _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose') ;~ Local $sCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"]}}}}' _WD_CapabilitiesStartup() _WD_CapabilitiesAdd('alwaysMatch','C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe') _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation') If $bHeadless 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 Link to comment Share on other sites More sharing options...
mLipok Posted April 13, 2023 Share Posted April 13, 2023 _WD_CapabilitiesAdd('alwaysMatch','msedge') 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 Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MRAJ Posted April 13, 2023 Author Share Posted April 13, 2023 That also not work thats why i gave the full path _WD_CapabilitiesAdd('alwaysMatch','msedge') Link to comment Share on other sites More sharing options...
Danp2 Posted April 13, 2023 Share Posted April 13, 2023 _WD_CapabilitiesAdd('alwaysMatch','msedge') is the correct format. I doubt that it would ever work properly with a fullpath provided. See here for full details on proper usage. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted April 13, 2023 Share Posted April 13, 2023 19 minutes ago, MRAJ said: SetupEdge($bHeadless) _WD_CapabilitiesStartup() Sleep(10000) $sSession = _WD_CreateSession() Please comment out the 2nd and 3rd lines and then report back with results. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted April 13, 2023 Author Share Posted April 13, 2023 same result it is not opening edge and driver. Link to comment Share on other sites More sharing options...
mLipok Posted April 13, 2023 Share Posted April 13, 2023 1 hour ago, MRAJ said: $sSession = _WD_CreateSession() How did you use capabilities here ? 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 Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Danp2 Posted April 13, 2023 Share Posted April 13, 2023 (edited) There are three issues that I can see with your script -- You need to save the Capabilities string that is being returned by the SetupEdge function This value then gets passed to _WD_CreateSession, which is what @mLipok alluded to above You need to call _WD_Startup, which is what actually launches the webdriver. This would need to occur after the call to SetupEdge and before you call _WD_CreateSession. Edit: The above is in additional to the "alwaysMatch" issue previously mentioned. 😉 Edited April 13, 2023 by Danp2 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted April 14, 2023 Author Share Posted April 14, 2023 Hello Dan, Thanks it working now. I forgot to add _WD_Startup to start the webdriver. Now the issue which i was facing earlier for Error SSL mismatch for the website using script. So script is running under the same account which the script configured and same existing profile. and with same user profile i am running other scripts too without any issue. Link to comment Share on other sites More sharing options...
Danp2 Posted April 14, 2023 Share Posted April 14, 2023 So, how about posting that reproducer now? 😉 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted April 17, 2023 Author Share Posted April 17, 2023 expandcollapse popup#include "wd_core.au3" #include "wd_helper.au3" #include "wd_capabilities.au3" $_WD_DEBUG = $_WD_DEBUG_None ; Could also use $_WD_DEBUG_Error $_WD_DEBUG = $_WD_DEBUG_Info ; Gives you the greatest level of details _WD_Option('console', @ScriptDir & "\wdudf.log") Local $bHeadless,$sSession, $sElement SetupEdge($bHeadless) ;_WD_CapabilitiesStartup() ;Sleep(10000) _WD_Startup() $sSession = _WD_CreateSession() _WD_Navigate($sSession,"https://url:portnumber") _WD_Window($sSession,"maximize") _WD_LoadWait($sSession) Sleep(10000) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@id='details-button']") _WD_ElementAction($sSession,$sElement,'click') Sleep(10000) _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupEdge($bHeadless) _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose') ;~ Local $sCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"]}}}}' _WD_CapabilitiesStartup() _WD_CapabilitiesAdd('alwaysMatch','msedge') _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation') If $bHeadless 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 Attached is the script and wdudf logs: _WD_Option ==> Success [0] : Parameters: Option=console Value=E:\wdudf.log _WD_Option ==> Success [0] : Parameters: Option=Driver Value=msedgedriver.exe _WD_Option ==> Success [0] : Parameters: Option=Port Value=9515 _WD_Option ==> Success [0] : Parameters: Option=DriverParams Value=--verbose _WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch] with specified browser: msedge _WD_CapabilitiesAdd ==> Success [0] : Successfully added capability _WD_CapabilitiesDump: JSON structure starts below: -1 { "capabilities":{ "alwaysMatch":{ "ms:edgeOptions":{ "excludeSwitches":[ "enable-automation" ] } } } } _WD_CapabilitiesDump: JSON structure ends above. _WD_GetFreePort ==> Success [0] : 9515 _WD_IsLatestRelease ==> Success [0] : True _WD_Startup: OS: WIN_2016 WIN32_NT 17763 _WD_Startup: AutoIt: 3.3.14.5 _WD_Startup: Webdriver UDF: 0.13.0 (Up to date) _WD_Startup: WinHTTP: 1.6.4.1 (Download latest source at <https://raw.githubusercontent.com/dragana-r/autoit-winhttp/master/WinHttp.au3>) _WD_Startup: Driver: msedgedriver.exe (32 Bit) _WD_Startup: Params: --verbose _WD_Startup: Port: 9515 _WD_Startup: Command: "msedgedriver.exe" --verbose _WD_Startup ==> Success [0] __WD_Post ==> Success [0] : HTTP status = 200 _WD_CreateSession ==> Success [0] : 010ddbc5ad330d6ebf0cf3c449ffa51f __WD_Post ==> Webdriver Exception [10] : HTTP status = 500 _WD_Navigate ==> Webdriver Exception [10] : Parameters: URL=https://url:portnumber __WD_Post ==> Success [0] : HTTP status = 200 _WD_Window ==> Success [0] : Parameters: Command=maximize Option=Default _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=//button[@id='details-button'] StartNodeID=Default Multiple=Default ShadowRoot=Default __WD_Post ==> Success [0] : HTTP status = 200 _WD_ElementAction ==> Success [0] : Parameters: Command=click Option=Default __WD_Delete ==> Success [0] : HTTP status = 200 _WD_DeleteSession ==> Success [0] : WebDriver session deleted and using script giving the error but manually running the browser it is opening. Link to comment Share on other sites More sharing options...
mLipok Posted April 17, 2023 Share Posted April 17, 2023 (edited) Fixed a little: expandcollapse popup#AutoIt3Wrapper_Run_AU3Check=Y #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <MsgBoxConstants.au3> #include <String.au3> #include <Array.au3> #include "wd_helper.au3" #include "wd_capabilities.au3" Global $sSession _Example() Func _Example() ;~ $_WD_DEBUG = $_WD_DEBUG_None ; Could also use $_WD_DEBUG_Error ;~ $_WD_DEBUG = $_WD_DEBUG_Info ; Gives you optimized level of details $_WD_DEBUG = $_WD_DEBUG_Full ; Gives you the greatest level of details _WD_Option('console', @ScriptDir & "\wdudf.log") _WD_UpdateDriver('msedge') Local $sCapabilities = SetupEdge(False) _WD_Startup() $sSession = _WD_CreateSession($sCapabilities) MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "Wait after session creation") _WD_Navigate($sSession, "https://url:portnumber") _WD_Window($sSession, "maximize") _WD_LoadWait($sSession) ;~ Sleep(10000) Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@id='details-button']") _WD_ElementAction($sSession, $sElement, 'click') ;~ Sleep(10000) MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "Wait before closing WebDriver") _WD_DeleteSession($sSession) _WD_Shutdown() EndFunc ;==>_Example Func SetupEdge($bHeadless) _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose') ;~ Local $sCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"]}}}}' _WD_CapabilitiesStartup() _WD_CapabilitiesAdd('alwaysMatch', 'msedge') _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation') _WD_CapabilitiesAdd('args', 'user-data-dir', @LocalAppDataDir & '\Microsoft\Edge\User Data\WD_Testing_Profile') If $bHeadless 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 focus on: Local $sCapabilities = SetupEdge(False) _WD_Startup() $sSession = _WD_CreateSession($sCapabilities) and: _WD_CapabilitiesAdd('args', 'user-data-dir', @LocalAppDataDir & '\Microsoft\Edge\User Data\WD_Testing_Profile') Edited April 17, 2023 by mLipok MRAJ 1 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 Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MRAJ Posted April 17, 2023 Author Share Posted April 17, 2023 Changes i made..but no change of website error. it is giving me the same error as i mentioned earlier. Link to comment Share on other sites More sharing options...
mLipok Posted April 17, 2023 Share Posted April 17, 2023 @MRAJ please take a look here: and here: https://github.com/mlipok/Au3WebDriver-testing please check it with "msedge" and with "chrome" Let me HERE know about the results. 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 Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MRAJ Posted April 17, 2023 Author Share Posted April 17, 2023 I used Edge Browser and same result as below Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now