Danp2 / au3WebDriver

Web Driver UDF for AutoIt
MIT License
107 stars 21 forks source link

SetupEdge - user-data-dir - admin support #452

Closed mlipok closed 1 year ago

mlipok commented 1 year ago

Pull request

Proposed changes

Add support for runing MS EDGE with elevated to admin

#RequireAdmin

Checklist

Types of changes

What is the current behavior?

using SetupEdge with elevation to Admin will hit error

What is the new behavior?

works properly

Additional context

https://www.autoitscript.com/forum/topic/210071-webdriver-and-admin-rights

https://www.autoitscript.com/forum/topic/210071-webdriver-and-admin-rights/?do=findComment&comment=1516684

System under test

MS EDGE

mlipok commented 1 year ago

Should we also add relevant changes for other browsers ? I mean for any case.

mlipok commented 1 year ago

Maybe check if is admin .. ?

Danp2 commented 1 year ago

Maybe check if is admin .. ?

That's an option. However, I suggest that we take a step back and analyze the purpose of wd_demo. IMO, it is designed to demonstrate some of the basic functionality of the WD UDF. It isn't designed to handle every possible scenario or strange configuration that someone can throw at it.

There are obvious times where exceptions are made. One example is where the 'binary' option was added to the Capabilities string to avoid issues with 32-bit versions of some webdrivers. This is a common error that could occur, so it made sense to include the fix.

I'm not so sure that this current issue would fall into that same category of commonly occurring. Until today, I've never run wd_demo with #requireadmin, and I highly doubt that others need this functionality in this demo script.

Danp2 commented 1 year ago

https://github.com/MicrosoftEdge/EdgeWebDriver/issues/80

Danp2 commented 1 year ago

So this behavior is by design per Microsoft. Also, further testing has shown that this change doesn't actually fix the issue,