jcpetu Posted March 20, 2020 Share Posted March 20, 2020 @Danp2, I copied chromedriver executable to the script dir and adjusted _WD_Option to point to it. Now I've got: _WDStartup: OS: WIN_81 WIN32_NT 9600 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.2.0.6 _WDStartup: WinHTTP: 1.6.4.1 _WDStartup: Driver: C:\Temp\Programacion\A3\WEB Browser\00-WebDriver UDF\chromedriver.exe _WDStartup: Params: --log-path="C:\Temp\Programacion\A3\WEB Browser\00-WebDriver UDF\chrome.log" _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}} __WD_Post: StatusCode=500; ResponseText={"value":{"error":"session not created","message":"session not created: This version of ChromeDriver only supports Chrome version 81","stacktrace":"Backtrace:\n\tOrdinal0 [0x01205F73+2449267]\n\tOrdinal0 [0x01138361+1606497]\n\tOrdinal0 [0x0102F969+522601]\n\tOrdinal0 [0x00FC05F3+67059]\n\tOrdinal0 [0x00FBCD92+52626]\n\tOrdinal0 [0x00FDC127+180519]\n\tOrdinal0 [0x00FDBF2D+180013]\n\tOrdinal0 [0x00FD9E5B+171611]\n\tOrdinal0 [0x00FC1DD8+73176]\n\tOrdinal0 [0x00FC2E50+77392]\n\tOrdinal0 [0x00FC2DE9+77289]\n\tOrdinal0 [0x0114D8D7+1693911]\n\tGetHandleVerifier [0x012A4036+522726]\n\tGetHandleVerifier [0x012A3D74+522020]\n\tGetHandleVerifier [0x012B9187+609079]\n\tGetHandleVerifier [0x012A48A6+524886]\n\tOrdinal0 [0x01145CBC+1662140]\n\tOrdinal0 [0x0114F23B+1700411]\n\tOrdinal0 [0x0114F3A3+1700771]\n\tOrdinal0 [0x01165215+1790485]\n\tBaseThreadInitThunk [0x77426A14+36]\n\tRtlInitializeExceptionChain [0x77E4ADCF+143]\n\tRtlInitializeExceptionChain [0x77E4AD9A+90]\n"}} __WD_Post ==> Timeout: {"value":{"error":"session not created","message":"session not created: This version of ChromeDriver only supports Chrome version 81","stacktrace":"Backtrace:\n\tOrdinal0 [0x01205F73+2449267]\n\tOrdinal0 [0x01138361+1606497]\n\tOrdinal0 [0x0102F969+522601]\n\tOrdinal0 [0x00FC05F3+67059]\n\tOrdinal0 [0x00FBCD92+52626]\n\tOrdinal0 [0x00FDC127+180519]\n\tOrdinal0 [0x00FDBF2D+180013]\n\tOrdinal0 [0x00FD9E5B+171611]\n\tOrdinal0 [0x00FC1DD8+73176]\n\tOrdinal0 [0x00FC2E50+77392]\n\tOrdinal0 [0x00FC2DE9+77289]\n\tOrdinal0 [0x0114D8D7+1693911]\n\tGetHandleVerifier [0x012A4036+522726]\n\tGetHandleVerifier [0x012A3D74+522020]\n\tGetHandleVerifier [0x012B9187+609079]\n\tGetHandleVerifier [0x012A48A6+524886]\n\tOrdinal0 [0x01145CBC+1662140]\n\tOrdinal0 [0x0114F23B+1700411]\n\tOrdinal0 [0x0114F3A3+1700771]\n\tOrdinal0 [0x01165215+1790485]\n\tBaseThreadInitThunk [0x77426A14+36]\n\tRtlInitializeExceptionChain [0x77E4ADCF+143]\n\tRtlInitializeExceptionChain [0x77E4AD9A+90]\n"}} _WD_CreateSession: {"value":{"error":"session not created","message":"session not created: This version of ChromeDriver only supports Chrome version 81","stacktrace":"Backtrace:\n\tOrdinal0 [0x01205F73+2449267]\n\tOrdinal0 [0x01138361+1606497]\n\tOrdinal0 [0x0102F969+522601]\n\tOrdinal0 [0x00FC05F3+67059]\n\tOrdinal0 [0x00FBCD92+52626]\n\tOrdinal0 [0x00FDC127+180519]\n\tOrdinal0 [0x00FDBF2D+180013]\n\tOrdinal0 [0x00FD9E5B+171611]\n\tOrdinal0 [0x00FC1DD8+73176]\n\tOrdinal0 [0x00FC2E50+77392]\n\tOrdinal0 [0x00FC2DE9+77289]\n\tOrdinal0 [0x0114D8D7+1693911]\n\tGetHandleVerifier [0x012A4036+522726]\n\tGetHandleVerifier [0x012A3D74+522020]\n\tGetHandleVerifier [0x012B9187+609079]\n\tGetHandleVerifier [0x012A48A6+524886]\n\tOrdinal0 [0x01145CBC+1662140]\n\tOrdinal0 [0x0114F23B+1700411]\n\tOrdinal0 [0x0114F3A3+1700771]\n\tOrdinal0 [0x01165215+1790485]\n\tBaseThreadInitThunk [0x77426A14+36]\n\tRtlInitializeExceptionChain [0x77E4ADCF+143]\n\tRtlInitializeExceptionChain [0x77E4AD9A+90]\n"}} _WD_CreateSession ==> Webdriver Exception: HTTP status = 500 __WD_Delete: URL=HTTP://127.0.0.1:9515/session/ __WD_Delete: StatusCode=200; ResponseText={"value":null} _WD_DeleteSession: {"value":null} and chrome.log is the following: [1584744550.326][INFO]: Starting ChromeDriver 81.0.4044.69 (6813546031a4bc83f717a2ef7cd4ac6ec1199132-refs/branch-heads/4044@{#776}) on port 9515 [1584744550.327][INFO]: Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. [1584744550.754][INFO]: [83a4dce5a212461287ff592387e07bca] COMMAND InitSession { "capabilities": { "alwaysMatch": { "goog:chromeOptions": { "w3c": true } } } } [1584744550.788][INFO]: Populating Preferences file: { "alternate_error_pages": { "enabled": false }, "autofill": { "enabled": false }, "browser": { "check_default_browser": false }, "distribution": { "import_bookmarks": false, "import_history": false, "import_search_engine": false, "make_chrome_default_for_user": false, "skip_first_run_ui": true }, "dns_prefetching": { "enabled": false }, "profile": { "content_settings": { "pattern_pairs": { "https://*,*": { "media-stream": { "audio": "Default", "video": "Default" } } } }, "default_content_setting_values": { "geolocation": 1 }, "default_content_settings": { "geolocation": 1, "mouselock": 1, "notifications": 1, "popups": 1, "ppapi-broker": 1 }, "password_manager_enabled": false }, "safebrowsing": { Link to comment Share on other sites More sharing options...
Danp2 Posted March 20, 2020 Author Share Posted March 20, 2020 1 minute ago, jcpetu said: This version of ChromeDriver only supports Chrome version 81 This... which I also mentioned in the edit to my earlier post. 😁 jcpetu 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jcpetu Posted March 20, 2020 Share Posted March 20, 2020 @Danp2, Ok, Idownloaded the correct Chromedriver and WinHTTP versions and it's working find now. Thanks a lot for your help and for the UDF. Link to comment Share on other sites More sharing options...
CYCho Posted March 20, 2020 Share Posted March 20, 2020 (edited) 1 hour ago, jcpetu said: Chrome version: 80.0.3987.149 (Official Build) (64-bit) ChromeDriver: 81.0.4044.69 on port 9515 Please see here for matching versions of Chrome and ChromeDriver. Edit: Oops, problem was already solved. Edited March 20, 2020 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
VodkaDiva Posted March 21, 2020 Share Posted March 21, 2020 (edited) Love Dan Edited March 21, 2020 by VodkaDiva xxxxxxxxxxx Link to comment Share on other sites More sharing options...
Danp2 Posted March 21, 2020 Author Share Posted March 21, 2020 @VodkaDiva Did you figure it out? If so, please share so that everyone can benefit. 😎 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jcpetu Posted March 21, 2020 Share Posted March 21, 2020 Just in case any one need it: For Chrome version: 80.0.3987.149 (Official Build) (64-bit) appropriate version of ChromeDriver is: 80.0.3987.16 and you can get it from: https://chromedriver.storage.googleapis.com/index.html?path=80.0.3987.16/ Link to comment Share on other sites More sharing options...
VodkaDiva Posted March 22, 2020 Share Posted March 22, 2020 https://peter.sh/experiments/chromium-command-line-switches/ Hi Dan ! can you note this page in first page ? for everyone need config ! Thanks dan xxxxxxxxxxx Link to comment Share on other sites More sharing options...
Retaki Posted March 26, 2020 Share Posted March 26, 2020 May you please tell me what i supposed to do? I only tried to run wd_demo.au3. Link to comment Share on other sites More sharing options...
Danp2 Posted March 26, 2020 Author Share Posted March 26, 2020 @Retaki I suspect that one of your UDF files contains invalid data. The file size for WinHttp.au3 looks way too big, so that's where I would suggest that you look first. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Retaki Posted March 26, 2020 Share Posted March 26, 2020 You are right, cause i didn't download it directly from the link you mentioned, am unable to download it, may you please re attach it for me? Link to comment Share on other sites More sharing options...
Danp2 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) Best thing to do is grab the latest version on GitHub, which contains some necessary updates. https://github.com/dragana-r/autoit-winhttp Edit: To be clear, you don't want to download the 1.6.4.1 release, which is several years old. You want to download the latest source from the master branch. Edited March 26, 2020 by Danp2 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Retaki Posted March 26, 2020 Share Posted March 26, 2020 Thanks i did as you said and it works, thank you. P.s: i will get back you later am developing a tool to automate my job related tasks and i hope that you can help. Link to comment Share on other sites More sharing options...
Retaki Posted March 27, 2020 Share Posted March 27, 2020 <input class="select2-search__field" type="search" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox"> This is a dropdown box i want to click then write some text then select the first highlighted result appeared. Here is my code $lgnButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@id='select2-headerLoginAsUserSelect-container']") _WD_ElementAction($sSession, $lgnButton, 'click') _WD_LoadWait($sSession, 3000) $lgnButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@class='select2-search__field']") _WD_ElementAction($sSession, $lgnButton, 'value', "farha") May you please help? I get that error __WD_Post: URL=HTTP://127.0.0.1:9515/session/bd9c04d592ff2369746c0a3bf8c51e08/element/7572756e-7c6e-451d-b6cf-f6713aa65780/value; $sData={"id":"7572756e-7c6e-451d-b6cf-f6713aa65780", "text":"farha"} __WD_Post: StatusCode=400; ResponseText={"value":{"error":"element not interactable","message":"element not interactable\n (Session info: _WD_ElementAction: {"value":{"error":"element not interactable","message":"element not interactable\n (Session info: c... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"element not interactable","message":"element not interactable\n (Session info: Link to comment Share on other sites More sharing options...
Danp2 Posted March 27, 2020 Author Share Posted March 27, 2020 @Retaki You're mostly likely targeting the wrong element. I'm guessing that the dropdown is an instance of Select2. Their website containing document appears to be down ATM, but I imagine that you can interact with the control using _WD_ExecuteScript to programmatically select an option. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HCD_Boy Posted March 27, 2020 Share Posted March 27, 2020 Is it possible to start the Browser in 'application mode'? (with argument --app, or --app-id xxxx) For example, I have a web application, similar WhatsApp Web. I added this Website to "Apps" in Chrome. So I have a separate Icon in the task list, which is very helpful. Now I would like to start this "Application" (which is actually a normal website) with AutoIt and Webdriver, so i can automate the login process afterwards. Many thanks! Link to comment Share on other sites More sharing options...
Retaki Posted March 27, 2020 Share Posted March 27, 2020 How can i retrieve value from element? Like i want to make sure if the selected element having the value i want or no? Link to comment Share on other sites More sharing options...
Danp2 Posted March 27, 2020 Author Share Posted March 27, 2020 @HCD_Boy Yes... you need to pass your desired arguments as part of the DesiredCapabilities string when calling _WD_CreateSession. For Chrome, see information here regarding the "args" option under ChromeOptions. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted March 27, 2020 Author Share Posted March 27, 2020 @Retaki See DemoElements function in wd_demo.au3 for example of retrieving an element's value. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Retaki Posted March 27, 2020 Share Posted March 27, 2020 6 minutes ago, Retaki said: How can i retrieve value from element? Like i want to make sure if the selected element having the value i want or no? Also how can i know if the _WD_FindElement has found the required element? like true/false? Link to comment Share on other sites More sharing options...
Recommended Posts