1

I'm refering to the following post: Unable to hide "Chrome is being controlled by automated software" infobar within Chrome v76

Here is the Python code:

options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)

I need to implement that solution in Powershell. Any help is appreciated!

UCA
  • 11
  • 2

1 Answers1

0
    # Works with Powershell 7.2.5, WebDriver 4.3.0 and ChromeDriver 103
    $Options = New-Object OpenQA.Selenium.Chrome.ChromeOptions
    $Options.AddArgument("useAutomationExtesion=false")
    $Options.AddExcludedArgument("enable-automation") 
Nick B
  • 11
  • 1
    This answer was reviewed in the [Low Quality Queue](https://stackoverflow.com/help/review-low-quality). Here are some guidelines for [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer). Code only answers are **not considered good answers**, and are likely to be downvoted and/or deleted because they are **less useful** to a community of learners. It's only obvious to you. Explain what it does, and how it's different / **better** than existing answers. [From Review](https://stackoverflow.com/review/low-quality-posts/32410687) – IndieGameDev Aug 05 '22 at 17:37
  • 2
    I respectfully disagree. The response is concise, intuitively obvious, answers the question accurately, and satisfies the "any help is appreciated" qualifier. At what level of detail does an answer like this become "more useful?" Shall I assume the reader is incapable, as a member of a community of learners, to investigate the PowerShell code on their own, comment every line and refer them to the MS literature or, trust they are capable, curious, and competent to take on that investigation on their own? Putting a reader on the path of learning is more useful then walking the path for them. – Nick B Feb 13 '23 at 15:16