Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard pattern for calling browser-specific functions on webdriver? #262

Open
dhalperi opened this issue Jan 26, 2021 · 2 comments
Open
Assignees

Comments

@dhalperi
Copy link

dhalperi commented Jan 26, 2021

Hi,

We make great use of the chrome_options and firefox_options fixtures - they're great.

However, some functionality is only exposed on a specific instance of Webdriver, e.g., ChromiumDriver#set_network_conditions

Is there a standard place/way to call these functions only when the right type of browser is in use? Obviously we can inspect the current webdriver, pytestconfig, test environment, etc., to determine whether it's a ChromiumDriver, but since the options are handled so nicely I thought maybe this would be too.

@BeyondEvil
Copy link
Contributor

BeyondEvil commented Jan 26, 2021

Could you exemplify what you're looking for?

Maybe even in a PR? ;)

@isaulv
Copy link
Contributor

isaulv commented Mar 5, 2021

There is a standard in flux that deals with the extra capabilities that Chrome provides via the remote DevTools Protocol. When "Webdriver Bidrectional Interface" standard is formalized, there will be a way to test this. 4.0 is in beta and I am waiting until the final release is out to understand how Firefox and Chrome report their CDP capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants