Skip to content

[πŸ› Bug]: [Python] WebDriver constructor must not assume that BaseOptions instance has _ignore_local_proxy propertyΒ #10755

@mykola-mokhnach

Description

@mykola-mokhnach

What happened?

I'm talking about

_ignore_local_proxy = options._ignore_local_proxy

The typing info says options: Union[BaseOptions, List[BaseOptions]] = None, while _ignore_local_proxy property is only defined for ArgOptions class. This means any code that inherits Options from BaseOptions rather than from ArgOptions would fail with missing attribute error (which is also happening for the Appium Python client)

How can we reproduce the issue?

Pass any custom class inherited from BaseOptions rather than from ArgOptions to the WebDriver constructor

Relevant log output

if options:
                capabilities = options.to_capabilities()
>               _ignore_local_proxy = options._ignore_local_proxy
E               AttributeError: 'UiAutomator2Options' object has no attribute '_ignore_local_proxy'


### Operating System

macOS

### Selenium version

Python 3.9

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

Appium

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

Any

### Are you using Selenium Grid?

_No response_

Metadata

Metadata

Assignees

Labels

C-pyPython BindingsI-defectSomething is not working as intended

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions