
loulou2522
Active Members-
Posts
33 -
Joined
-
Last visited
Everything posted by loulou2522
-
Methods to allow sending email at google with any mailer PROCEDURE en-GB.pdf
-
Has anyone developed a command line program with autoit3 to read a QRCODE? Thanks in advance . Ihere is an example in attached files
-
_WinAPI_RegCreateKey( and ACL right
loulou2522 replied to loulou2522's topic in AutoIt General Help and Support
Yes but with #RequireAdmin you are obliged to make a response when launching programm and that's that i do'nt want -
My profile is LOCAL administrator I use the following code #include <APIRegConstants.au3> #include <Array.au3> #include <MsgBoxConstants.au3> #include <WinAPIError.au3> #include <WinAPIReg.au3> #include <WinAPIProc.au3> #include <WinAPIFiles.au3> #include <File.au3> Local $sWow64 = "" If @AutoItX64 Then $sWow64 = "\Wow6432Node" $akey = "HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\Policies\Google\Chrome" Msgbox(0,"",_RegGetAccess($akey) ) _RegSetAccess($akey) toto($akey) Exit ;Local $hKey = _WinAPI_RegOpenKey(HKEY_LOCAL_MACHINE, 'SOFTWARE' & $sWow64 & '\Policies\Google\Chrome', $KEY_QUERY_VALUE) ;If @error Then ; MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), @extended, _WinAPI_GetErrorMessage(@extended)) ; Exit ;EndIf ;Local $tData = DllStructCreate('int') ;_WinAPI_RegQueryValue($hKey, 'AlwaysOpenPdfExternally', $tData) ;_WinAPI_RegCloseKey($hKey) ;ConsoleWrite(DllStructGetData($tData,1) & @CRLF) Func _RegSetAccess($a_key) RunWait(@scriptdir & 'SetACL.exe -on ' & $a_key & ' -ot reg -actn setowner -ownr "n:S-1-5-32-544"', '', @SW_HIDE) RunWait(@scriptdir & '\SetACL.exe -on ' & $a_key & ' -ot reg -actn ace -ace "n:S-1-5-32-544;p:full"', '', @SW_HIDE) EndFunc ;==>_RegSetAccess Func _RegGetAccess($a_key) Local $a_file = _TempFile() RunWait(@ScriptDir & '\SetACL.exe -on ' & $a_key & ' -ot reg -actn list -lst "w:o;s:y" -bckp ' & $a_file, '', @SW_HIDE) If StringInStr(FileRead($a_file), 'Owner:S-1-5-32-544') Then Return True Return False EndFunc ;==>_RegGetAccess Func toto($akey) Msgbox(0,"","Ligne 54") Local $aAdjust, $aPrivileges[2] = [$SE_BACKUP_NAME, $SE_RESTORE_NAME] Local $hToken = _WinAPI_OpenProcessToken(BitOR($TOKEN_ADJUST_PRIVILEGES, $TOKEN_QUERY)) Msgbox(0,"",_WinAPI_GetLastErrorMessage ( )) If @error Or @extended Then Return 0 EndIf Msgbox(0,"","Ligne 68") _WinAPI_AdjustTokenPrivileges($hToken, $aPrivileges, $SE_PRIVILEGE_ENABLED, $aAdjust) Msgbox(0,"",_WinAPI_GetLastErrorMessage ( )) If @error Or @extended Then Return 0 EndIf Msgbox(0,"","Ligne 60") Local $hRoot = StringLeft($akey, StringInStr($akey, "\") - 1) Switch $hRoot Case "HKEY_LOCAL_MACHINE", "HKLM", "HKEY_LOCAL_MACHINE32", "HKLM32", "HKEY_LOCAL_MACHINE64", "HKLM64" $hRoot = $HKEY_LOCAL_MACHINE Case "HKEY_USERS", "HKU", "HKEY_USERS32", "HKU32", "HKEY_USERS64", "HKU64" $hRoot = $HKEY_USERS Case "HKEY_CURRENT_USER", "HKCU", "HKEY_CURRENT_USER32", "HKCU32", "HKEY_CURRENT_USER64", "HKCU64" $hRoot = $HKEY_CURRENT_USER Case "HKEY_CLASSES_ROOT", "HKEY_CLASSES_ROOT64", "HKCR" $hRoot = $HKEY_CLASSES_ROOT Case Else Return SetError(1, 0, 0) EndSwitch Local $Subkey = "\" & StringTrimLeft($akey, StringInStr($akey, "\")) Local $hKey = _WinAPI_RegOpenKey($hRoot, $Subkey, $KEY_CREATE_SUB_KEY) If @error Then MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), @extended, _WinAPI_GetErrorMessage(@extended)) Exit EndIf Msgbox(0,"",_WinAPI_RegOpenKey($hRoot, $Subkey, $KEY_CREATE_SUB_KEY)) Local $newKey = _WinAPI_RegCreateKey($hKey, $Subkey, $KEY_CREATE_SUB_KEY) _WinAPI_RegCloseKey($newKey) _WinAPI_RegCloseKey($hKey) _WinAPI_AdjustTokenPrivileges($hToken, $aAdjust, 0, $aAdjust) _WinAPI_CloseHandle($hToken) EndFunc ;==>toto But htat"s dosen't work when writing registry i have the following message
-
Hi all, Where can i find the name of the registry key which allow donloading a pdf file istead of displaying a Pdf file Thanks in advance
-
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Yes when creating a new profile and after when using this profile -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
State to reproduce my problem : 1- Create on Chrome a new profile ex patrickun 2' Launch the following proogramm and wait for exit #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=toto.exe #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Language=1036 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #Au3Stripper_Parameters=/sf /sv #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("MustDeclareVars", 0) Opt("MouseCoordMode", 1) Opt("WinTitleMatchMode", 4) Opt("SendKeyDelay", 100) Opt("SendKeyDownDelay", 5) Opt("CaretCoordMode", 0) Opt("WinWaitDelay", 550) Opt("MouseClickDelay", 20) Opt("TrayIconDebug", 1) Opt("PixelCoordMode", 0) Global $echrome = True Global $Ssession,$sDesiredCapabilities #include "wd_core.au3" #include "wd_helper.au3" ;================================================ ;Recherche d la langue du systéme d'exploitation ;============================================= $_WD_ESCAPE_CHARS = '\\"' SetupChrome() _WD_Startup() Sleep(1000) $sSession = _WD_CreateSession($sDesiredCapabilities) ;_WD_Window($sSession, 'Maximize') _WD_Navigate($sSession, "http://www.google.com") _WD_LoadWait($sSession, 500, -1) _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupChrome() ;====================================== _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": { "acceptInsecureCerts":true, "unhandledPromptBehavior": "ignore","goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false,"prefs": {"credentials_enable_service": false}, "args":["start-minimized","--user-data-dir=C:\\Users\\' & @UserName & '\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Patrickun", "disable-infobars"]}}}}' EndFunc ;==>SetupChrome 3- Relaunch the programm again When launching the programm again you will have an error messsage This indicate that's chrome wasn't closed correctly. 4- If i use anaother way to close programm instead of _WD_DeleteSession($sSession) _WD_Shutdown() If ProcessExists("chrome.exe") Then $aList = WinList() For $i = 1 To $aList[0][0] If StringInStr($aList[$i][0], "Google Chrome") > 0 And BitAND(WinGetState($aList[$i][1]), 2) Then Sleep(200) WinClose($aList[$i][1]) EndIf Next EndIf If ProcessExists("chromedriver.exe") Then Local $hWnd = WinWait("[REGEXPTITLE:(chromedriver.exe)]", "", 1) WinClose($hWnd) EndIf With thats command Chrome end correctly and if you relaunch another time the programm, you don't have an error message like below. I explain my problem and hope it will be suffisant because i can't say more abour this problem -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
For easy comprehension I don't use : $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": { "acceptInsecureCerts":true, "unhandledPromptBehavior": "ignore","goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false,"prefs": {"credentials_enable_service": false}, "args":["start-minimized","--user-data-dir=C:\\Users\\' & @UserName & '\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Patrickun", "disable-infobars"]}}}}' But if you use another profile like me 'partrickun' the problem is the same you can test it Maybe i make something tha't is wrong ? -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
I think I have detected a problem in the chrome driver. Indeed in the case of use of a specific profile during the normal shutdown of the program and that I send the following commands; WD_DeleteSession ($ sSession) and_WD_Shutdown () Chrome closes normally but when reopened I get the following message "Restore pages? Chrome did not shut down properly" <RESTORE> If I close the program the following way If ProcessExists ("chrome.exe") Then $ aList = WinList () For $ i = 1 To $ aList [0] [0] If StringInStr ($ aList [$ i] [0], "Google Chrome")> 0 And BitAND (WinGetState ($ aList [$ i] [1]), 2) Then Sleep (200) WinClose ($ aList [$ i] [1]) EndIf Next EndIf If ProcessExists ("chromedriver.exe") Then Local $ hWnd = WinWait ("[REGEXPTITLE: (chromedriver.exe)]", "", 1) WinClose ($ hWnd) EndIf then the programm restarts without error message Here is the code which allow to test this problem #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=toto.exe #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Language=1036 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #Au3Stripper_Parameters=/sf /sv #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("MustDeclareVars", 0) Opt("MouseCoordMode", 1) Opt("WinTitleMatchMode", 4) Opt("SendKeyDelay", 100) Opt("SendKeyDownDelay", 5) Opt("CaretCoordMode", 0) Opt("WinWaitDelay", 550) Opt("MouseClickDelay", 20) Opt("TrayIconDebug", 1) Opt("PixelCoordMode", 0) Global $echrome = True Global $Ssession,$sDesiredCapabilities #include "wd_core.au3" #include "wd_helper.au3" ;================================================ ;Recherche d la langue du systéme d'exploitation ;============================================= SetupChrome() _WD_Startup() Sleep(1000) $sSession = _WD_CreateSession($sDesiredCapabilities) ;_WD_Window($sSession, 'Maximize') _WD_Navigate($sSession, "http://www.google.com") _WD_LoadWait($sSession, 500, -1) _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupChrome() ;====================================== _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": { "acceptInsecureCerts":true, "unhandledPromptBehavior": "ignore","goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false,"prefs": {"credentials_enable_service": false}, "args":["start-minimized","--user-data-dir=C:\\Users\\' & @UserName & '\\AppData\\Local\\Google\\Chrome\\User Data\\", "disable-infobars"]}}}}' EndFunc ;==>SetupChrome After you have to relaunch the programm and you get this message : -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Yes but i have a problem. When i launch manually chrome that's works perfectly but when i launc it with chrome driver the message reappears It seem that the profile loaded is not the same because manually send and automatic execution I launch with Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') _WD_Option('DriverParams','--user-data-dir="C:\Users\xxx\AppData\Local\Google\Chrome\User Data\Default"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", ' & _ '"goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, ' & _ '"prefs": {"credentials_enable_service": false}, "args": ["start-maximized"] }}}}' EndFunc ;==>SetupChrome -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Hi Damp2, Thanks for your precious help. Sorry because i don't speak english very well and what i want to say is Can you help me and not you can't help After research , I found the way to avoid this message by modifying chrome config Here is the solution : ================================ To deactivate this file message in chrome "This type of file can damage your computer" for xml files, for other type of file this is the same thing to do go to 😄\Users\%Username\%localappData\Local\Google\Chrome\User Data\FileTypePolicies\40 open the file download_file_types.pb and delete the xml extension ;=================================== -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Hi Damp2, You can't help me solving my security problem (seeing my post earlier) ? Perhaps it's impossible to make something ? THanks in advance -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Is it possible to respond to this message Ce type de fichier risque d'endommager votre ordinateur : Enregsitrer Annuler ? -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
THanks DAmp2 That's work perfectly -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
$sSession = _WD_CreateSession($sDesiredCapabilities) ;_WD_Window($sSession, 'Maximize') _WD_Navigate($sSession,"https://ubs-paymentstandards.ch/login") Sleep(1000) $sTouche =_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='gwt-uid-3']") _WD_ElementAction($sSession, $sTouche, 'clear') Sleep(2000) _ChromeSetInputValueById($sSession,'gwt-uid-3','English') Sleep(1000) exit Here is the code to reproduce this case . Hope it will be suffisant for you to show the problem -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
How can i change the select option with the following sentence <div role="combobox" class="v-filterselect v-widget v-has-width" style="width: 20em;"> <input type="text" class="v-filterselect-input" autocomplete="nope" id="gwt-uid-3" aria-labelledby="gwt-uid-2" tabindex="0" dir="" style="width: 100%;"> <div class="v-filterselect-button" aria-hidden="true" role="button"></div></div> My code $sTouche =_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='gwt-uid-3']") _WD_ElementAction($sSession, $sTouche, 'property','') _ChromeSetInputValueById($sSession,'gwt-uid-3','English') And the debugger __WD_Post: URL=HTTP://127.0.0.1:9515/session/4ed0969e6701ee585ee758f05deb98f3/element; $sData={"using":"xpath","value":"//input[@id='gwt-uid-3']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"5472b4ed-0b82-4bf2-b75f-4fbde4f8a117"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"5472b4ed-0b82-4bf2-b75f-4fbde4f8a117"}} __WD_Get: URL=HTTP://127.0.0.1:9515/session/4ed0969e6701ee585ee758f05deb98f3/element/5472b4ed-0b82-4bf2-b75f-4fbde4f8a117/property/ __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":null}... _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/4ed0969e6701ee585ee758f05deb98f3/element; $sData={"using":"xpath","value":"//input[@id='gwt-uid-3']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"5472b4ed-0b82-4bf2-b75f-4fbde4f8a117"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"5472b4ed-0b82-4bf2-b75f-4fbde4f8a117"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/4ed0969e6701ee585ee758f05deb98f3/element/5472b4ed-0b82-4bf2-b75f-4fbde4f8a117/value; $sData={"id":"5472b4ed-0b82-4bf2-b75f-4fbde4f8a117", "text":"English"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null}... +>15:21:34 AutoIt3.exe ended.rc:0 +>15:21:34 AutoIt3Wrapper Finished. >Exit code: 0 Time: 22.66 Beforei have "Deutsch" in the input and after i have DeutschEnglish in the fields -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
@damp I solve my problem making delay like following and after iall is working $sbutton= _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//button[@id='action.save' and @name='action' and @class='btn btn-md btn-primary col-md-3 pull-right']") Local $test92 = _WD_ElementAction($sSession, $sbutton, 'click') sleep(1000) Thanks -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Sorry, What details did you need ? If you want i can send you the programm by PM -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
-
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Here is your add-on to add to wd_core3 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WD_SelectUploadFile ; Description ...: ; Syntax ........: _WD_SelectUploadFile($sSession, $sStrategy, $sSelector, $sFilename) ; Parameters ....: $sSession - Session ID from _WDCreateSession ; $sStrategy - Locator strategy. See defined constant $_WD_LOCATOR_* for allowed values ; $sSelector - Value to find ; $sFilename - String representing full path of file to upload ; Return values .: Success - 1 ; Failure - 0 ; @ERROR - $_WD_ERROR_Success ; - $_WD_ERROR_Exception ; - $_WD_ERROR_NoMatch ; @EXTENDED - WinHTTP status code ; Author ........: Dan Pollak ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _WD_SelectUploadFile($sSession, $sStrategy, $sSelector, $sFilename) Local Const $sFuncName = "_WD_SelectUploadFile" Local $sResponse, $sResult, $sJsonElement, $oJson Local $sElement = _WD_FindElement($sSession, $sStrategy, $sSelector) Local $iErr = @error If $iErr = $_WD_ERROR_Success Then $sResult = _WD_ElementAction($sSession, $sElement, 'value', $sFilename) $iErr = @error If $iErr = $_WD_ERROR_Success Then $sJsonElement = '{"' & $_WD_ELEMENT_ID & '":"' & $sElement & '"}' $sResponse = _WD_ExecuteScript($sSession, "return arguments[0].files.length", $sJsonElement) $oJson = Json_Decode($sResponse) $sResult = Json_Get($oJson, "[value]") EndIf EndIf If $_WD_DEBUG = $_WD_DEBUG_Info Then ConsoleWrite($sFuncName & ': ' & $sResult & " file(s) selected" & @CRLF) EndIf Return SetError(__WD_Error($sFuncName, $iErr), $_WD_HTTPRESULT, $sResult) EndFunc I test all These function, they works with Chrome , Edge and Firefox all in the last version Thanls to Damp for this excellent programm of automation , it's really a great add-ons -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Hi Damp Here is the result of your programm _WDStartup: OS: WIN_10 WIN32_NT 18362 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.21 _WDStartup: Driver: chromedriver.exe _WDStartup: Params: --log-path="C:\Users\Patrick\Desktop\TESTPOSTFINANCE\ChromeDriver\chrome.log" _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }, "goog:loggingPrefs": {"browser":"ALL"}}}} __WD_Post: StatusCode=200; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"78.0.3904.97","chrome":{"chromedriverVersion":"78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800})","userDataDir":"C:\\Users\\Patrick\\AppData\\Local\\Temp\\scoped_dir15260_1274292444"},"goog:chromeOptions":{"debuggerAddress":"localhost:50840"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows nt","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"},"sessionId":"81ba15e5ec9e04f3c1e0996579f7803f"}} _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"78.0.3904.97","chrome":{"chromedriverVersion":"78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800})","userDataDir":"C:\\Users\\Patrick\\AppData\\Local\\Temp\\scoped_dir15260_1274292444"},"goog:chromeOptions":{"debuggerAddress":"localhost:50840"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows nt","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"},"sessionId":"81ba15e5ec9e04f3c1e0996579f7803f"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/81ba15e5ec9e04f3c1e0996579f7803f/url; $sData={"url":"https://cgi-lib.berkeley.edu/ex/fup.html"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_Navigate: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:9515/session/81ba15e5ec9e04f3c1e0996579f7803f/element; $sData={"using":"xpath","value":"//input[@name='upfile']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"4bb969f7-1bba-4b0e-b717-ef3e8aa263bb"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"4bb969f7-1bba-4b0e-b717-ef3e8aa263bb"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/81ba15e5ec9e04f3c1e0996579f7803f/element/4bb969f7-1bba-4b0e-b717-ef3e8aa263bb/value; $sData={"id":"4bb969f7-1bba-4b0e-b717-ef3e8aa263bb", "text":"C:\\Users\\Patrick\\Desktop\\CV.EXEMPT.TXT"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/81ba15e5ec9e04f3c1e0996579f7803f/execute/sync; $sData={"script":"return arguments[0].files.length", "args":[{"element-6066-11e4-a52e-4f735466cecf":"4bb969f7-1bba-4b0e-b717-ef3e8aa263bb"}]} __WD_Post: StatusCode=200; ResponseText={"value":1} _WD_ExecuteScript: {"value":1} _WD_SelectUploadFile: 1 file(s) selected _WD_SelectUploadFile ==> Success +>08:23:27 AutoIt3.exe ended.rc:0 +>08:23:27 AutoIt3Wrapper Finished. >Exit code: 0 Time: 10.05 And integrating in my programm _WDStartup: WD.au3: 0.1.0.21 _WDStartup: Driver: MicrosoftWebDriver.exe _WDStartup: Params: --verbose _WDStartup: Port: 17556 __WD_Post: URL=HTTP://127.0.0.1:17556/session; $sData={"capabilities":{}} __WD_Post: StatusCode=200; ResponseText={"value":{"sessionId":"7CED8404-8F06-45BF-9DF3-DC06A3EB80D3","capabilities":{"acceptInsecureCerts":false,"browserName":"MicrosoftEdge","browserVersion":"44.18362.387.0","pageLoadStrategy":"normal","platformName":"windows","setWindowRect":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"proxy":{}}}} _WD_CreateSession: {"value":{"sessionId":"7CED8404-8F06-45BF-9DF3-DC06A3EB80D3","capabilities":{"acceptInsecureCerts":false,"browserName":"MicrosoftEdge","browserVersion":"44.18362.387.0","pageLoadStrategy":"normal","platformName":"windows","setWindowRect":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"proxy":{}}}} __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/window/maximize; $sData={} __WD_Post: StatusCode=200; ResponseText={"value":{"height":744,"width":1382,"x":0,"y":0}} _WD_Window: {"value":{"height":744,"width":1382,"x":0,"y":0}}... __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/url; $sData={"url":"https://isotest.postfinance.ch/corporates/login?locale=fr"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_Navigate: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element; $sData={"using":"xpath","value":"//input[@id='username']"} __WD_Post: StatusCode=200; ResponseText={"value":{"ELEMENT":"4dccf855-4994-40dc-a7f1-1b42910a65e0","element-6066-11e4-a52e-4f735466cecf":"4dccf855-4994-40dc-a7f1-1b42910a65e0"}} _WD_FindElement: {"value":{"ELEMENT":"4dccf855-4994-40dc-a7f1-1b42910a65e0","element-6066-11e4-a52e-4f735466cecf":"4dccf855-4994-40dc-a7f1-1b42910a65e0"}} __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element/4dccf855-4994-40dc-a7f1-1b42910a65e0/value; $sData={"id":"4dccf855-4994-40dc-a7f1-1b42910a65e0", "text":"loulou2522"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element; $sData={"using":"xpath","value":"//input[@id='password']"} __WD_Post: StatusCode=200; ResponseText={"value":{"ELEMENT":"d3540a36-86bc-4fd9-95ba-5ae25ab14024","element-6066-11e4-a52e-4f735466cecf":"d3540a36-86bc-4fd9-95ba-5ae25ab14024"}} _WD_FindElement: {"value":{"ELEMENT":"d3540a36-86bc-4fd9-95ba-5ae25ab14024","element-6066-11e4-a52e-4f735466cecf":"d3540a36-86bc-4fd9-95ba-5ae25ab14024"}} __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element/d3540a36-86bc-4fd9-95ba-5ae25ab14024/value; $sData={"id":"d3540a36-86bc-4fd9-95ba-5ae25ab14024", "text":"Isabelle01#"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element; $sData={"using":"xpath","value":"//button[@id='action.login']"} __WD_Post: StatusCode=200; ResponseText={"value":{"ELEMENT":"d251ce1a-6e51-49d0-8673-1c6cde81a7c8","element-6066-11e4-a52e-4f735466cecf":"d251ce1a-6e51-49d0-8673-1c6cde81a7c8"}} _WD_FindElement: {"value":{"ELEMENT":"d251ce1a-6e51-49d0-8673-1c6cde81a7c8","element-6066-11e4-a52e-4f735466cecf":"d251ce1a-6e51-49d0-8673-1c6cde81a7c8"}} __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element/d251ce1a-6e51-49d0-8673-1c6cde81a7c8/click; $sData={"id":"d251ce1a-6e51-49d0-8673-1c6cde81a7c8"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element; $sData={"using":"xpath","value":"//input[@name='files[]' and @id='inputFile']"} __WD_Post: StatusCode=200; ResponseText={"value":{"ELEMENT":"9b213276-9aab-4f29-8539-cad63397390d","element-6066-11e4-a52e-4f735466cecf":"9b213276-9aab-4f29-8539-cad63397390d"}} _WD_FindElement: {"value":{"ELEMENT":"9b213276-9aab-4f29-8539-cad63397390d","element-6066-11e4-a52e-4f735466cecf":"9b213276-9aab-4f29-8539-cad63397390d"}} __WD_Post: URL=HTTP://127.0.0.1:17556/session/7CED8404-8F06-45BF-9DF3-DC06A3EB80D3/element/9b213276-9aab-4f29-8539-cad63397390d/value; $sData={"id":"9b213276-9aab-4f29-8539-cad63397390d", "text":"C:\inetpub\wwwroot\sepach\doc\TESTSWISSSEPAVIR.xml"} __WD_Post: StatusCode=500; ResponseText={"value":{"error":"unknown error","message":"An unknown error occurred while processing the specified command.","stacktrace":""}} _WD_ElementAction: {"value":{"error":"unknown error","message":"An unknown error occurred while processing the specifie... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"unknown error","message":"An unknown error occurred while processing the specified command.","stacktrace":""}} _WD_SelectUploadFile: file(s) selected _WD_SelectUploadFile ==> Webdriver Exception +>08:34:14 AutoIt3.exe ended.rc:0 +>08:34:14 AutoIt3Wrapper Finished. >Exit code: 0 Time: 21.93 The main difference is that in the web page cliicking on input file open the open dialog window. if you want i will send you by separate email the programm because the access of this web page is protected ? Thanks for your great help -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
OK i download the winhttp v 1.6.4.2 But the programm block on the window OpenFiledialog. It seems that's this window is modal. -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
It's impossible to use autoit automation because the programm blocks on this instruction $Upload = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='files[]' and @id='inputFile']") $sJsonElement = '{"' & $_WD_ELEMENT_ID & '":"' & $Upload & '"}' $sResponse = _WD_ExecuteScript($sSession, "return arguments[0].click()", $sJsonElement) Here is the debug log __WD_Post: URL=HTTP://127.0.0.1:17556/session/1D4582A5-9360-41BA-8230-44A5E63F2259/element; $sData={"using":"xpath","value":"//input[@name='files[]' and @id='inputFile']"} __WD_Post: StatusCode=200; ResponseText={"value":{"ELEMENT":"2b5201cf-8262-43f0-bead-d6bc308d54af","element-6066-11e4-a52e-4f735466cecf":"2b5201cf-8262-43f0-bead-d6bc308d54af"}} _WD_FindElement: {"value":{"ELEMENT":"2b5201cf-8262-43f0-bead-d6bc308d54af","element-6066-11e4-a52e-4f735466cecf":"2b5201cf-8262-43f0-bead-d6bc308d54af"}} _WD_WaitElement ==> Success __WD_Post: URL=HTTP://127.0.0.1:17556/session/1D4582A5-9360-41BA-8230-44A5E63F2259/element; $sData={"using":"xpath","value":"//input[@name='files[]' and @id='inputFile']"} __WD_Post: StatusCode=200; ResponseText={"value":{"ELEMENT":"2b5201cf-8262-43f0-bead-d6bc308d54af","element-6066-11e4-a52e-4f735466cecf":"2b5201cf-8262-43f0-bead-d6bc308d54af"}} _WD_FindElement: {"value":{"ELEMENT":"2b5201cf-8262-43f0-bead-d6bc308d54af","element-6066-11e4-a52e-4f735466cecf":"2b5201cf-8262-43f0-bead-d6bc308d54af"}} __WD_Post: URL=HTTP://127.0.0.1:17556/session/1D4582A5-9360-41BA-8230-44A5E63F2259/execute/sync; $sData={"script":"return arguments[0].click()", "args":[{"element-6066-11e4-a52e-4f735466cecf":"2b5201cf-8262-43f0-bead-d6bc308d54af"}]} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_ExecuteScript: 0 -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
Thanks Danp2, THat's work perfectly. Only one thing with the dialogbox can i use _WD_Alert to enter a name of file ? -
WebDriver UDF - Help & Support
loulou2522 replied to Danp2's topic in AutoIt General Help and Support
this is _ WD_ElementAction($sSession, $Upload, 'click') That is not accepted. Only a click on left or right button of the mouse is accepted. Is it possible with elementAction to do something ?