Skip to content

Selenium 4 - Chromium functions are not available with MSEdgeDriver in TS/JS #9626

@alejandro-vime

Description

@alejandro-vime

🐛 Bug Report

Using the setNetworkConditions function from Chrome DevTools in Selenium 4 (previously available in Selenium 3 with the edge-selenium-tools project) returns the following error:

[error] this.getDriver(...).setNetworkConditions is not a function

Due to our recent upgrade to Selenium 4 I read some of the PRs regarding MS Edge and Chromium and believe edge.js Driver might need to extend chromium for these to be available.

PR #9239
@harsha509

To Reproduce

await this.getDriver().setNetworkConditions({
        offline: true,
        latency: 0, // Additional latency (ms).
        download_throughput: 0, // Maximal aggregated download throughput.
        upload_throughput: 0 // Maximal aggregated upload throughput.
  });

Setting this up in a test and running with MS Edge browser will return the above error.

Expected behavior

Expected the function to be available in Selenium 4 as per the edge-selenium-tools description.

Test script or set of commands reproducing this issue

Use "to reproduce"

Environment

OS: Windows10
Browser: MS Edge
Browser version: 91.0.864.64
Browser Driver version: msedgedriver 91.0.864.64
Language Bindings version: Typescript 4.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions