Skip to content

[🐛 Bug]: mypy error for action_chains #12469

@MarcelWilson

Description

@MarcelWilson

What happened?

mypy (1.4.1) is erroring on a incompatible type for ActionChains(driver)

As far as I can tell ActionChains should allow for all of the WebDriver subclasses not just a subset, shouldn't it?

How can we reproduce the issue?

from selenium.webdriver.remote.webdriver import WebDriver

driver: WebDriver
ActionChains(driver)

Relevant log output

Argument 1 to "ActionChains" has incompatible type "selenium.webdriver.remote.webdriver.WebDriver"; expected "selenium.webdriver.chrome.webdriver.WebDriver | selenium.webdriver.firefox.webdriver.WebDriver | selenium.webdriver.safari.webdriver.WebDriver | selenium.webdriver.ie.webdriver.WebDriver | selenium.webdriver.edge.webdriver.WebDriver"  [arg-type]


### Operating System

macOS

### Selenium version

4.11.2

### What are the browser(s) and version(s) where you see this issue?

n/a

### What are the browser driver(s) and version(s) where you see this issue?

n/a

### Are you using Selenium Grid?

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyAn easy issue to implement or PR to reviewI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions