mLipok Posted January 4, 2022 Share Posted January 4, 2022 (edited) So today few times I get: Quote __WD_Post: StatusCode=400; ResponseText={"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in ... __WD_Post ==> Invalid argument: {"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir","stacktrace":"Backtrace:\n\tOrdinal0 [0x01096903+2517251]\n\tOrdinal0 [0x0102F8E1+2095329]\n\tOrdinal0 [0x00F32848+1058888]\n\tOrdinal0 [0x00F4D8AB+1169579]\n\tOrdinal0 [0x00F4A2CF+1155791]\n\tOrdinal0 [0x00F7AAAF+1354415]\n\tOrdinal0 [0x00F7A71A+1353498]\n\tOrdinal0 [0x00F7639B+1336219]\n\tOrdinal0 [0x00F527A7+1189799]\n\tOrdinal0 [0x00F53609+1193481]\n\tGetHandleVerifier [0x01225904+1577972]\n\tGetHandleVerifier [0x012D0B97+2279047]\n\tGetHandleVerifier [0x01126D09+534521]\n\tGetHandleVerifier [0x01125DB9+530601]\n\tOrdinal0 [0x01034FF9+2117625]\n\tOrdinal0 [0x010398A8+2136232]\n\tOrdinal0 [0x010399E2+2136546]\n\tOrdinal0 [0x01043541+2176321]\n\tBaseThreadInitThunk [0x75B3FA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77037A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x77037A6E+238]\n"}} _WD_CreateSession: {"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir","stacktrace":"Backtrace:\n\tOrdinal0 [0x01096903+2517251]\n\tOrdinal0 [0x0102F8E1+2095329]\n\tOrdinal0 [0x00F32848+1058888]\n\tOrdinal0 [0x00F4D8AB+1169579]\n\tOrdinal0 [0x00F4A2CF+1155791]\n\tOrdinal0 [0x00F7AAAF+1354415]\n\tOrdinal0 [0x00F7A71A+1353498]\n\tOrdinal0 [0x00F7639B+1336219]\n\tOrdinal0 [0x00F527A7+1189799]\n\tOrdinal0 [0x00F53609+1193481]\n\tGetHandleVerifier [0x01225904+1577972]\n\tGetHandleVerifier [0x012D0B97+2279047]\n\tGetHandleVerifier [0x01126D09+534521]\n\tGetHandleVerifier [0x01125DB9+530601]\n\tOrdinal0 [0x01034FF9+2117625]\n\tOrdinal0 [0x010398A8+2136232]\n\tOrdinal0 [0x010399E2+2136546]\n\tOrdinal0 [0x01043541+2176321]\n\tBaseThreadInitThunk [0x75B3FA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77037A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x77037A6E+238]\n"}} _WD_CreateSession ==> Webdriver Exception: HTTP status = 400 and program exits due to @error handling. but few attempts later: Quote _WD_IsLatestRelease: True _WD_IsLatestRelease ==> Success _WD_Startup: OS: WIN_10 WIN32_NT 19044 _WD_Startup: AutoIt: 3.3.15.5 _WD_Startup: WD.au3: 0.5.0.3 (Up to date) _WD_Startup: WinHTTP: 1.6.4.2 _WD_Startup: Driver: chromedriver.exe _WD_Startup: Params: _WD_Startup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={ "capabilities":{ "alwaysMatch":{ "acceptInsecureCerts":true }, "firstMatch":[ { "browserName":"chrome", "goog:chromeOptions":{ "w3c":true, "args":[ "user-agent=Mozilla\/5.0 (Windows NT 10.0; Win64; X64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/96.0.4664.110 Safari\/537.36", "user-data-dir=C:\\Users\\Szef\\AppData\\Local\\Google\\Chrome\\User Data\\Default", "--profile-directory=default", "start-maximized", "disable-infobars", "--no-sandbox", "--disable-blink-features=AutomationControlled", "--disable-web-security", "--allow-running-insecure-content", "--ignore-certificate-errors", "--headless" ], "prefs":{ "credentials_enable_service":false, "download.default_directory":"Z:\\!!!_SVN_AU3\\UDF_ML\\Testing\\TESTING_DOWNLOAD" }, "excludeSwitches":[ "disable-popup-blocking", "enable-automation", "load-extension" ] } } ] } } __WD_Post: StatusCode=200; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":true,"browserName":"chrome","browserVersion":"96.0.4... _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":true,"browserName":"chrome","browserVersion":"96.0.4664.110","chrome":{"chromedriverVersion":"96.0.4664.45 (76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947})","userDataDir":"C:\\Users\\Szef\\AppData\\Local\\Google\\Chrome\\User Data\\Default"},"goog:chromeOptions":{"debuggerAddress":"localhost:62223"},"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:virtualAuthenticators":true},"sessionId":"f7c8d4bea5f711c49040338825cc8c75"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/execute/sync; $sData={"script":"return window.devicePixelRatio", "args":[]} __WD_Post: StatusCode=200; ResponseText={"value":1}... _WD_ExecuteScript: {"value":1}... _WD_ExecuteScript ==> Success: HTTP status = 200 __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/url; $sData={"url":"************************"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_Navigate: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/execute/sync; $sData={"script":"return document.readyState", "args":[]} __WD_Post: StatusCode=200; ResponseText={"value":"complete"}... _WD_ExecuteScript: {"value":"complete"}... _WD_ExecuteScript ==> Success: HTTP status = 200 __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"css selector","value":"#nkw .clear-book"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"ea97d80d-2456-443d-9609-ff0598171e48"}}... _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"ea97d80d-2456-443d-9609-ff0598171e48"}} __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/ea97d80d-2456-443d-9609-ff0598171e48/displayed __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/ea97d80d-2456-443d-9609-ff0598171e48/enabled __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... _WD_WaitElement ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/ea97d80d-2456-443d-9609-ff0598171e48/click; $sData={"id":"ea97d80d-2456-443d-9609-ff0598171e48"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"css selector","value":"select#kodWydzialu"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"5e420b4e-5271-4c2a-af2a-a6680e4bcb56"}}... _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"5e420b4e-5271-4c2a-af2a-a6680e4bcb56"}} __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/5e420b4e-5271-4c2a-af2a-a6680e4bcb56/property/nodeName __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":"SELECT"}... _WD_ElementAction: {"value":"SELECT"}... __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/5e420b4e-5271-4c2a-af2a-a6680e4bcb56/property/outerHTML __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":"\u003Cselect id=\"kodWydzialu\" name=\"kodEci\" class=\"required hide\">\n ... _WD_ElementAction: {"value":"\u003Cselect id=\"kodWydzialu\" name=\"kodEci\" class=\"required hide\">\n ... _WD_ElementSelectAction: (array) _WD_ElementSelectAction ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"css selector","value":"select#kodWydzialu ~ input"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"acc86ed7-f0e4-4e84-854e-a0b58fe49bbe"}}... _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"acc86ed7-f0e4-4e84-854e-a0b58fe49bbe"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/acc86ed7-f0e4-4e84-854e-a0b58fe49bbe/value; $sData={"id":"acc86ed7-f0e4-4e84-854e-a0b58fe49bbe", "text":"KA1P"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"xpath","value":"//*[@id='numerKsiegiWieczystej']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"e83ca5de-de7d-4a0d-80fb-a96b827a8868"}}... _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"e83ca5de-de7d-4a0d-80fb-a96b827a8868"}} __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/e83ca5de-de7d-4a0d-80fb-a96b827a8868/displayed __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/e83ca5de-de7d-4a0d-80fb-a96b827a8868/enabled __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... _WD_WaitElement ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/e83ca5de-de7d-4a0d-80fb-a96b827a8868/clear; $sData={"id":"e83ca5de-de7d-4a0d-80fb-a96b827a8868"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/e83ca5de-de7d-4a0d-80fb-a96b827a8868/value; $sData={"id":"e83ca5de-de7d-4a0d-80fb-a96b827a8868", "text":"00050565"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_ElementAction: {"value":null}... _WD_SetElementValue ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"xpath","value":"//*[@id='cyfraKontrolna']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"242496b6-212c-4fe6-9fb2-ef8dccae156f"}}... _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"242496b6-212c-4fe6-9fb2-ef8dccae156f"}} __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/242496b6-212c-4fe6-9fb2-ef8dccae156f/displayed __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/242496b6-212c-4fe6-9fb2-ef8dccae156f/enabled __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... _WD_WaitElement ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/242496b6-212c-4fe6-9fb2-ef8dccae156f/clear; $sData={"id":"242496b6-212c-4fe6-9fb2-ef8dccae156f"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_ElementAction: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/242496b6-212c-4fe6-9fb2-ef8dccae156f/value; $sData={"id":"242496b6-212c-4fe6-9fb2-ef8dccae156f", "text":"0"} __WD_Post: StatusCode=200; ResponseText={"value":null}... _WD_ElementAction: {"value":null}... _WD_SetElementValue ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"css selector","value":".error-content .visible"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\".error-content .visible\"}\n (Session info: headless chrome=96.0.4664.110)","stacktrace":"Backtrace:\n\tOrdinal0 [0x01096903+2517251]\n\tOrdinal0 [0x0102F8E1+2095329]\n\tOrdinal0 [0x00F32848+1058888]\n\tOrdinal0 [0x00F5D448+1233992]\n\tOrdinal0 [0x00F5D63B+1234491]\n\tOrdinal0 [0x00F87812+1406994]\n\tOrdinal0 [0x00F7650A+1336586]\n\tOrdinal0 [0x00F85BBF+1399743]\n\tOrdinal0 [0x00F7639B+1336219]\n\tOrdinal0 [0x00F527A7+1189799]\n\tOrdinal0 [0x00F53609+1193481]\n\tGetHandleVerifier [0x01225904+1577972]\n\tGetHandleVerifier [0x012D0B97+2279047]\n\tGetHandleVerifier [0x01126D09+534521]\n\tGetHandleVerifier [0x01125DB9+530601]\n\tOrdinal0 [0x01034FF9+2117625]\n\tOrdinal0 [0x010398A8+2136232]\n\tOrdinal0 [0x010399E2+2136546]\n\tOrdinal0 [0x01043541+2176321]\n\tBaseThreadInitThunk [0x75B3FA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77037A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x77037A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\".error-content .visible\"}\n (Session info: headless chrome=96.0.4664.110)","stacktrace":"Backtrace:\n\tOrdinal0 [0x01096903+2517251]\n\tOrdinal0 [0x0102F8E1+2095329]\n\tOrdinal0 [0x00F32848+1058888]\n\tOrdinal0 [0x00F5D448+1233992]\n\tOrdinal0 [0x00F5D63B+1234491]\n\tOrdinal0 [0x00F87812+1406994]\n\tOrdinal0 [0x00F7650A+1336586]\n\tOrdinal0 [0x00F85BBF+1399743]\n\tOrdinal0 [0x00F7639B+1336219]\n\tOrdinal0 [0x00F527A7+1189799]\n\tOrdinal0 [0x00F53609+1193481]\n\tGetHandleVerifier [0x01225904+1577972]\n\tGetHandleVerifier [0x012D0B97+2279047]\n\tGetHandleVerifier [0x01126D09+534521]\n\tGetHandleVerifier [0x01125DB9+530601]\n\tOrdinal0 [0x01034FF9+2117625]\n\tOrdinal0 [0x010398A8+2136232]\n\tOrdinal0 [0x010399E2+2136546]\n\tOrdinal0 [0x01043541+2176321]\n\tBaseThreadInitThunk [0x75B3FA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77037A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x77037A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"xpath","value":"//*[@id='wyszukaj']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"259e6b71-6b8f-44fe-9d08-2a050419b844"}}... _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"259e6b71-6b8f-44fe-9d08-2a050419b844"}} __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/259e6b71-6b8f-44fe-9d08-2a050419b844/displayed __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... __WD_Get: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/259e6b71-6b8f-44fe-9d08-2a050419b844/enabled __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}... _WD_ElementAction: {"value":true}... _WD_WaitElement ==> Success __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element/259e6b71-6b8f-44fe-9d08-2a050419b844/click; $sData={"id":"259e6b71-6b8f-44fe-9d08-2a050419b844"} __WD_Post: StatusCode=0; ResponseText=WinHTTP request timed out before Webdriver... __WD_Post ==> Send / Recv error: WinHTTP request timed out before Webdriver _WD_ElementAction: WinHTTP request timed out before Webdriver... _WD_ElementAction ==> Send / Recv error: WinHTTP request timed out before Webdriver __WD_Post: URL=HTTP://127.0.0.1:9515/session/f7c8d4bea5f711c49040338825cc8c75/element; $sData={"using":"xpath","value":"//*[@id='przyciskWydrukZwykly']"} __WD_Post: StatusCode=0; ResponseText=WinHTTP request timed out before Webdriver... __WD_Post ==> Send / Recv error: WinHTTP request timed out before Webdriver _WD_FindElement: WinHTTP request timed out before Webdriver _WD_FindElement ==> Send / Recv error: HTTP status = 0 _WD_WaitElement ==> Timeout ! 381 - NOT COMPILED Intercept_MessageBoxW WATCH POINT and at the same time I get: Alll this following process they are suspended browser processes that were being automated during test execution. Chromedriver.exe is closed but chrome.exe is still sitting in the background. are Edited January 4, 2022 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...
mLipok Posted January 4, 2022 Share Posted January 4, 2022 The main problem is why Chormedriver not always gives information "invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir" ? 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 January 4, 2022 Author Share Posted January 4, 2022 44 minutes ago, mLipok said: The main problem is why Chormedriver not always gives information "invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir" ? 1) Have you tried checking ProcessExists() at the beginning of your script (even if it's just for debugging purposes)? You could also use something like ProcExp to try to identify the processes that have those resources in use. 2) It's possible that __WD_CloseDriver needs improvement in how it forcibly shuts down the webdriver 3) Please be mindful that some discussions are outside the scope of this thread and should either go into a separate thread or the one in GH&S. 😉 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ElPandaRojo1 Posted January 5, 2022 Share Posted January 5, 2022 Good morning, I would like to know if there is an option to save a page that I have open in pdf, as if I did a CTRL + P, and there appears a print window but instead of giving it print, it is given to save the pdf to this page, I do not know if this is possible to save the active page in pdf? I would appreciate the answer to know if this is possible, at the moment I am making it take a print of an element, but this takes me an image, and I would like to do it in pdf to be able to copy the data it brings. Link to comment Share on other sites More sharing options...
mLipok Posted January 5, 2022 Share Posted January 5, 2022 This thread is not about getting help. It is about WD UDF in context of maintaining this UDF releases etc.... Ask 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...
ElPandaRojo1 Posted January 5, 2022 Share Posted January 5, 2022 Good morning, I would like to know if there is an option to save a page that I have open in pdf, as if I did a CTRL + P, and there appears a print window but instead of giving it print, it is given to save the pdf to this page, I do not know if this is possible to save the active page in pdf? I would appreciate the answer to know if this is possible, at the moment I am making it take a print of an element, but this takes me an image, and I would like to do it in pdf to be able to copy the data it brings. Link to comment Share on other sites More sharing options...
Danp2 Posted January 5, 2022 Author Share Posted January 5, 2022 Take a look at _WD_PrintToPDF. However, I'm not sure that the resulting PDF will have the data that you desire (it may be strictly an image). Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mLipok Posted January 6, 2022 Share Posted January 6, 2022 (edited) 6 hours ago, ElPandaRojo1 said: Good morning, I would like to know if there is an option to save a page that I have open in pdf, as if I did a CTRL + P, and there appears a print window but instead of giving it print, it is given to save the pdf to this page, I do not know if this is possible to save the active page in pdf? I would appreciate the answer to know if this is possible, at the moment I am making it take a print of an element, but this takes me an image, and I would like to do it in pdf to be able to copy the data it brings. https://www.py4u.net/discuss/17921 Answer #3: In My case it worked without any code modification,Just need to disabled the Chrome pdf viewer Here are the steps to disable it Go into Chrome Settings Scroll to the bottom click on Advanced Under Privacy And Security - Click on "Site Settings" Scroll to PDF Documents Enable "Download PDF files instead of automatically opening them in Chrome" Edited January 6, 2022 by mLipok TheDcoder 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...
mLipok Posted January 6, 2022 Share Posted January 6, 2022 (edited) https://www.edureka.co/community/64462/how-automatically-download-with-selenium-webdriver-python download_dir = "C:\\Temp\\Dowmload" # for linux/*nix, download_dir="/usr/Public" options = webdriver.ChromeOptions() profile = {"plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}], # Disable Chrome's PDF Viewer "download.default_directory": download_dir , "download.extensions_to_open": "applications/pdf"} options.add_experimental_option("prefs", profile) driver = webdriver.Chrome('//Server/Apps/chrome_driver/chromedriver.exe', chrome_options=options) # Optional argument, if not specified will search path. It would be quite possible to do the same with WD UDF in AutoIt. This is kind of capabilities to set in the capabilities string. Edited January 6, 2022 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...
andyking Posted January 6, 2022 Share Posted January 6, 2022 (edited) Dear @DAN: i have a question ;how to attatch an exist chrome instance window by WD_attatch? Edited January 6, 2022 by andyking Link to comment Share on other sites More sharing options...
andyking Posted January 6, 2022 Share Posted January 6, 2022 @Danp2 How to disable UDF version check,i can not connect to the internet,so it just put me the error message:_WD_IsLatestRelease: General Error seadoggie01 1 Link to comment Share on other sites More sharing options...
mLipok Posted January 6, 2022 Share Posted January 6, 2022 On 1/3/2022 at 3:36 PM, TheDcoder said: You can try the Page.printToPDF CDP command, i Could you provide example ? 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 January 6, 2022 Author Share Posted January 6, 2022 4 hours ago, andyking said: i have a question ;how to attatch an exist chrome instance window by WD_attatch? Was this Chrome instance launched via webdriver? What have you tried? 3 hours ago, andyking said: How to disable UDF version check,i can not connect to the internet,so it just put me the error message:_WD_IsLatestRelease: General Error Put the following line in your script before the call to _WD_Startup -- $_WD_DEBUG = $_WD_DEBUG_Error ; You could also use $_WD_DEBUG_None You can set the value back to $_WD_DEBUG_Info following the call to _WD_Startup if you desire. P.S. Be sure to check out the FAQ (link in my sig) and also try the forum search feature, which can help you find answers from prior discussions Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
TheDcoder Posted January 6, 2022 Share Posted January 6, 2022 28 minutes ago, mLipok said: Could you provide example ? It shouldn't be hard to do, call the ExecuteCDPCommand function (it might have been renamed) with the name of the command and a JSON object with desired parameters (refer to the documentation of the command for valid parameters). Let me know if you still need an example for this command. EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
andyking Posted January 7, 2022 Share Posted January 7, 2022 11 hours ago, Danp2 said: Was this Chrome instance launched via webdriver? What have you tried? Thank u @Danp2, i mean that the Chrome instance was not launched via webdriver,it just by manual Link to comment Share on other sites More sharing options...
Danp2 Posted January 7, 2022 Author Share Posted January 7, 2022 This is possible, but only under certain circumstances. See my prior post here. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
andyking Posted January 7, 2022 Share Posted January 7, 2022 11 minutes ago, Danp2 said: This is possible, but only under certain circumstances. See my prior post here. #include "wd_core.au3" Local $sDesiredCapabilities, $sSession ShellExecute("chrome.exe", "--remote-debugging-port=9222") SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "http://yahoo.com") Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"debuggerAddress": "localhost:9222"}}}}' EndFunc Thank u @Danp2, I see your program,see the chrome instance was launched by your code:ShellExecute("chrome.exe", "--remote-debugging-port=9222") i want attach a exsit instance not launched by any code, just like somebody used you computer to launched a chrome instance Link to comment Share on other sites More sharing options...
Danp2 Posted January 7, 2022 Author Share Posted January 7, 2022 @andykingI understand what you want, but it can only happen if the Chrome instance is launched with additional parameters as shown in the code. This launch can be manually performed via a shortcut, but there's no guarantee that the user will use that method when they launch the browser. Maybe CDP can help out here. @TheDcoderDo you have any suggestions here? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jasontj Posted January 7, 2022 Share Posted January 7, 2022 Hi. I have several scripts that control Chrome web browsers via XPATH, but for some reason I cannot get this particular one to work. The "SetupChrome" code is copied from the DEMO code. CODE: ; Set debug level $_WD_DEBUG = $_WD_DEBUG_Info ; Execute browser setup routine for user's browser selection Local $sDesiredCapabilities = Call(SetupChrome) _WD_Startup() If @error <> $_WD_ERROR_Success Then Return $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://iapps.courts.state.ny.us/chrs/SignIn") _WD_LoadWait($sSession, 2000) ; Enter UserName $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div/div[3]/div[1]/div[2]/form/div[4]/fieldset/input[1]") If @error = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'value', "jason") EndIf ERROR IN THE CONSOLE: _WD_Post: URL=HTTP://127.0.0.1:9515/session/6ecec49691b42a35040ba77c8cb359ea/element; $sData={"using":"xpath","value":"/html/body/div/div[3]/div[1]/div[2]/form/div[4]/fieldset/input[1]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... I have double checked the XPATH to the username field. I also cannot get a value inserted into the password field at this XPATH: /html/body/div/div[3]/div[1]/div[2]/form/div[4]/fieldset/input[2] Any help on this would be appreciated. Not sure if this site is somehow blocking me running a script. Link to comment Share on other sites More sharing options...
Danp2 Posted January 7, 2022 Author Share Posted January 7, 2022 @jasontjHave you tried using the relative xpath? Like this -- $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='txtUserName']") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts