Let me first preface my question with I am very new to Autoit.
I have tried to find information on this myself but I havent been successful so please forgive me if this information exists and I missed it.
I have put together a script that is supposed to open edge to a certain website and fill out the login form and then login. The script works if I run from SciTE but if I compile into an exe I get the error "_WD_Startup ==> General Error: Error launching web driver!" when I run the exe. I have tried including the webdriver msedgedriver.exe with the compiled script but still get the error. If I include a copy of the webdriver exe file in the same directory it works but I would really like to compile this all together in one exe for use on other computers.
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_File_Add=Path To EXE\msedgedriver.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include "wd_core.au3"
#include "wd_helper.au3"
Local $sDesiredCapabilities, $sSession, $sElement, $sUNElement, $sPWElement, $sBTNElement
SetupEdge()
_WD_Startup()
Sleep(2000)
_WD_ConsoleVisible()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://website ")
_WD_Window($sSession, "Maximize")
$sUNElement = _WD_FindElement($sSession,$_WD_LOCATOR_ByXPath,"//input[@placeholder='Email']")
$sPWElement = _WD_FindElement($sSession,$_WD_LOCATOR_ByXPath,"//input[@placeholder='Password']")
$sBTNElement = _WD_FindElement($sSession,$_WD_LOCATOR_ByXPath,"//span[@class='progress-default']")
_WD_ElementAction ($sSession, $sUNElement, 'value',"username")
_WD_ElementAction ($sSession, $sPWElement, 'value',"password")
_WD_ElementAction ($sSession, $sBTNElement, 'click')
Func SetupEdge()
_WD_Option('Driver', 'msedgedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--verbose')
$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}'
EndFunc