MRAJ Posted September 3, 2020 Share Posted September 3, 2020 Hello, Currently i am using IE browser for my Websites to run using IE udf like action,linkclickby text,objectbyname or id,IENavigate. Now i want to use Microsoft edge browser for my websites to run so there will be differences between both browsers, So any link or UDF for Microsoft edge browser, so that i can use the same action what i am doing using IE browser. Link to comment Share on other sites More sharing options...
Earthshine Posted September 3, 2020 Share Posted September 3, 2020 Nope. Edge is chromium based. Use UIAutomation or Webdriver My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 Thanks. Could you give me any link or document how to use and install Webdriver and UIAutomation. Link to comment Share on other sites More sharing options...
Musashi Posted September 3, 2020 Share Posted September 3, 2020 1 hour ago, MRAJ said: Could you give me any link or document how to use and install Webdriver and UIAutomation. https://www.autoitscript.com/wiki/WebDriver https://www.autoitscript.com/forum/topic/191990-webdriver-udf-w3c-compliant-version-08282020/ https://www.autoitscript.com/forum/topic/197080-using-ui-automation-code-in-autoit/ Randall_j and Earthshine 2 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 Thanks. Any sample script using Webdriver to open a website in Microsoft edge browser. Appreciate the help. Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 The included wd_demo.au3 shows that and a bunch more functionality. The Wiki also points to another thread containing some example scripts. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Nine Posted September 3, 2020 Share Posted September 3, 2020 Note : In the wd_demo.au3, you will need to change the binary location from user folder to program files folder x86 in the string $sDesiredCapabilities. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 @Nine Thanks for pointing that out. I'll see about fixing that for the next release. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Nine Posted September 3, 2020 Share Posted September 3, 2020 NP. Also the same flags as Chrome can be used with Edge to remove the info-bar regarding automation. I suggest you add that in demo. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 Hello, is it like this down below: $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace ("C:\Program Files (x86)", "\", "/") & '/AppData/Local/Microsoft/Edge SxS/Application/msedge.exe"}}}}' Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 Try this -- $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 Hello Dan, Do i need to install webdriver for Microsoft edge msedgedriver.exe? and what will be the path to put the driver. Website is not opening using edge Because i am getting this error below as output: __WD_Post: StatusCode=0; ResponseText=WinHTTP request timed out before Webdriver... __WD_Post ==> Send / Recv error: WinHTTP request timed out before Webdriver _WD_CreateSession: WinHTTP request timed out before Webdriver Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 I think you left out an important detail. I suspect that you are seeing a message similar to this -- Quote (Download latest source at <https://raw.githubusercontent.com/dragana-r/autoit-winhttp/master/WinHttp.au3>) This means that your WinHTTP UDF needs to be updated. Please copy the source at that link and paste it into your existing WinHTTP.au3, replacing the current code. 6 minutes ago, MRAJ said: Do i need to install webdriver for Microsoft edge msedgedriver.exe? and what will be the path to put the driver Yes. If it isn't in your current working directory, then you need to change this -- _WD_Option('Driver', 'msedgedriver.exe') to this -- _WD_Option("driver", "c:\full\path\to\msededriver.exe") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 ok..but i am not able to find msededriver.exe in my edge bowser path where it installed. Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 i have already updated in my script as below: _WD_Option('Driver', 'msedgedriver.exe') Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 This will download the msedge webdriver into your the script's directory -- #include "wd_helper.au3" _WD_UpdateDriver('msedge', Default, Default, True) Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 I put the below in my script #include "wd_helper.au3" _WD_UpdateDriver('msedge', Default, Default, True) in my script but still giving me the below output __WD_Post: StatusCode=0; ResponseText=WinHTTP request timed out before Webdriver... __WD_Post ==> Send / Recv error: WinHTTP request timed out before Webdriver Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 @MRAJ That code should be run from a separate script as a way to download the correct version of the MSEdge webdriver. I wouldn't recommend placing it in your main script. As far as the errors you are receiving, please post the comlete results from the Scite output panel so that we can get a complete picture of what is going on. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted September 3, 2020 Author Share Posted September 3, 2020 Below is my script. Could you please check if i am wrong in any line or any code needed to be added. #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sElement SetupEdge() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.google.com") - need to open the website in browser $sSession = _WD_CreateSession($sDesiredCapabilities) Func SetupEdge() _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' EndFunc Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2020 Share Posted September 3, 2020 You are missing the call to _WD_Startup(), which needs to occur before you call _WD_CreateSession. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now