CYCho Posted October 8, 2020 Posted October 8, 2020 (edited) @Jemboy, Try this: $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwithes": [ "enable-automation"], "useAutomationExtension": false,"prefs": {"credentials_enable_service": false}, "binary": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"}}}}' Edited October 9, 2020 by CYCho zPlayer - A Small Audio and Video Player
Danp2 Posted October 9, 2020 Author Posted October 9, 2020 @Jemboy Take a look at _WD_UpdateDriver. You can use it from within your main script to update the webdriver for chome, firefox, and edge. Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted October 9, 2020 Author Posted October 9, 2020 On 10/8/2020 at 3:39 AM, Jemboy said: Recently I found out that the Chromedriver will only look for Chrome in: C:\Program Files (x86)\Google\Chrome\Application\ If you have Chrome installed in any other folder, chromedriver will fail loading! See FAQ 4 in the Webdriver Wiki for the solution to this issue. Latest Webdriver UDF Release Webdriver Wiki FAQs
Jemboy Posted October 12, 2020 Posted October 12, 2020 (edited) On 10/9/2020 at 11:56 PM, Danp2 said: @Jemboy Take a look at _WD_UpdateDriver. You can use it from within your main script to update the webdriver for chome, firefox, and edge. Nice!👍 I looked at the function, and I presume folder/file rights have to be done by the "programmer", so _WD_UpdateDriver had the rights to write the driver ? Also will calling the _WD_UpdateDriver in a script update the driver every time ? My own update routine checks Chrome and Chromedriver version and only update if the Chrome version is > than Chromedriver. Edited October 12, 2020 by Jemboy
Jemboy Posted October 12, 2020 Posted October 12, 2020 On 10/9/2020 at 11:59 PM, Danp2 said: See FAQ 4 in the Webdriver Wiki for the solution to this issue. Thanks @Danp2 I had seen the Wiki on this subject but I did not realise I had to use double \ to escsape in the path. So that's probably why my attemps to incorporate the Chrome location did not work. @CYCho Seeing your post with the \\ , I felt so stupid 😁, at the moment I am in crisis mode@workbut I a going to test it out. Thanks!
ADream Posted October 19, 2020 Posted October 19, 2020 Hi, Im having problems with _WD_Download , im trying to dowload files from a portal , i need to login before reach this section : im able to extract the links of the " .pdf " files but when i use these url in WD_Dowload i have this output on console : code : _WD_DownloadFile("https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/EMECR/EMECR_Manual.pdf",@ScriptDir & "\sepudo.pdf") I think the dowload failed(it download a 3kb file that cant be opened as pdf, the size of these pdfs are 3Mb+) because this kind of url need a login before .i've tried to download a " public " pdf document and it works. pd : Im using wd_core v0.2.0.6 pd2 : Sorry for my English , im from Peru
Danp2 Posted October 19, 2020 Author Posted October 19, 2020 41 minutes ago, ADream said: Im using wd_core v0.2.0.6 Why?! That's really old. Please switch to v0.3.0.9 and then report back. Quote I think the dowload failed(it download a 3kb file that cant be opened as pdf, the size of these pdfs are 3Mb+) because this kind of url need a login before .i've tried to download a " public " pdf document and it works You may be correct. However, I know there were recent updates to _WD_DownloadFile. Also some changes in the latest unreleased version. ADream 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
ADream Posted October 20, 2020 Posted October 20, 2020 3 hours ago, Danp2 said: Why?! That's really old. Please switch to v0.3.0.9 and then report back. You may be correct. However, I know there were recent updates to _WD_DownloadFile. Also some changes in the latest unreleased version. Hahahaha , i've tried to update but when i run my scripts , some functions dont behave as the do with v0.3.0.9 , i'll update my scripts later 😔 Now im trying another aproach but in order to solve my problem... is there a way of enable this option in chromedriver with a line of code ? url : chrome://settings/content/pdfDocuments
Danp2 Posted October 20, 2020 Author Posted October 20, 2020 @ADream Try using this -- Local $sDesiredCapabilities = '{"capabilities":{"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "prefs": {"plugins.always_open_pdf_externally": true}}}}}' ADream 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
ADream Posted October 20, 2020 Posted October 20, 2020 5 hours ago, Danp2 said: @ADream Try using this -- Local $sDesiredCapabilities = '{"capabilities":{"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "prefs": {"plugins.always_open_pdf_externally": true}}}}}' Thank you so much for your help Danp2 !
pubeoutros Posted October 22, 2020 Posted October 22, 2020 @Danp2 Hi! It's possible to add an option to the _Wd_Attach so the browser doesn't get focus when the script runs the _Wd_Attach? Sometimes i'm working in another thing while the script is running and it bothers, the need to always change the window after the script runs the _Wd_Attach. Thanks!
Danp2 Posted October 22, 2020 Author Posted October 22, 2020 @pubeoutros I can't see anything in the code where I am forcibly changing the window focus, so I'm guessing the behavior that you are describing is a byproduct of whatever browser / webdriver combo you are using. Have you considered running in "headless" mode, where the browser isn't visible at all? Latest Webdriver UDF Release Webdriver Wiki FAQs
pubeoutros Posted October 22, 2020 Posted October 22, 2020 3 hours ago, Danp2 said: @pubeoutros I can't see anything in the code where I am forcibly changing the window focus, so I'm guessing the behavior that you are describing is a byproduct of whatever browser / webdriver combo you are using. Have you considered running in "headless" mode, where the browser isn't visible at all? Yes I tried the headless, but i use this to copy some tables and find some clients and add information, that way, and sometimes, i need the browser to be visible to copy some informations (to my phone, for example). Ok, thanks anyway, it's only beacuse it bothers, I have my script to run every 30min or 1h and every time that the script runs, the _WD_Attach, the browser get focus. Nothing that i couldn't handle, but once again, it's boring and makes me losing my focus. I just thought that it could be done inside the _WD_Attach. I need to search and do some tests to try to get what windows is active, before the _WD_Attach and after the Attach, get that windows active again. Thanks!
frank10 Posted October 27, 2020 Posted October 27, 2020 (edited) I would like the same option like pubeoutros. inside _WD_Attach , I think it's happening specifically with the line: _WD_Window($sSession, 'Switch', '{"handle":"' & $sHandle & '"}') It's strange that it seems to popup chrome focus only every 2 times it's called. (I put some msgbox to find when it brings the chrome to focus) i.e. first call to Attach it doesn't focus, but the Chrome icon on Taskbar becomes Orange, then at the next call of _WD_Attach/switch it brings the focus on chrome and the taskbar icon return to normal! Me too can't use Chrome headless, so for me it's very disturbing... If you have an idea to solve this it'll be great. Maybe disabling that icon state notification in the taskbar, reminder of a program attention? I found this: "Icons on the taskbar will flash orange when they "require attention", this also unhides the taskbar until you switch to the application. The Taskbar programs sometimes glow orange and flash because they are active or they have some notification." Edited October 27, 2020 by frank10
caramen Posted October 27, 2020 Posted October 27, 2020 (edited) @Danp2 Hello mate, I wonder if it is possible using webdriver or something else to use that kind of code : _GUICtrlRichEdit_SetSel("", "", "") _GUICtrlRichEdit_SetCharBkColor( "", "") _GUICtrlRichEdit_Deselect( "" ) In short, is it possible to attach a rich edit control from Google Chrome to AutoIt function ? Edited October 27, 2020 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Danp2 Posted October 28, 2020 Author Posted October 28, 2020 14 hours ago, caramen said: is it possible to attach a rich edit control from Google Chrome to AutoIt function ? This isn't something that I've tried, so I can't really answer your question. I imagine that it would be better to manipulate the control using javascript or by calling one of its native methods. Can you provide an example website with the RTF control you want to access? Latest Webdriver UDF Release Webdriver Wiki FAQs
caramen Posted October 28, 2020 Posted October 28, 2020 (edited) I have no example yet but I can find one... I mean I'm just thinking about the recent snippet I made and if this could be possible I could make a lot of powerfull things. I'm working with a lot of different ticket tools. And it would be cool to work inside the ticket behavior field. I have multiple ideas. let's take one of the AutoIT community friend : https://regex101.com/ Let's say I want to use the lines tagged above. With this input field. Is it possible ? Actually the goal is to highlight things. But not Chrome elements. Text elements only. Everywhere depending on the regexp return values. Edited October 28, 2020 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Danp2 Posted October 28, 2020 Author Posted October 28, 2020 @caramen Sorry, but I'm not sure that I understand your question. Are you asking if it's possible to enter text into the test string field? Latest Webdriver UDF Release Webdriver Wiki FAQs
caramen Posted October 28, 2020 Posted October 28, 2020 (edited) No look my last screen it demonstrate what I did into rich edit AutoIT control. Would like to do same into a chrome input field. like the regex101 one. Edited October 28, 2020 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Danp2 Posted October 28, 2020 Author Posted October 28, 2020 Not a great example IMO since the regex101 website isn't using an RTF editor. Take a look at https://quilljs.com/playground/ for a better example. 1 hour ago, Danp2 said: I imagine that it would be better to manipulate the control using javascript or by calling one of its native methods. Still think this will be your best option when attempting to do this within a web browser. Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts