Jump to content

Run the Website using Microsoft edge browser


MRAJ
 Share

Recommended Posts

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

Musashi-C64.png

"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

Link to comment
Share on other sites

Link to comment
Share on other sites

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

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

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")

 

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...