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

[py] https://github.com/SeleniumHQ/selenium/pull/8096 broke RemoteConnection subclass selection for chrome #8521

Closed
ghost opened this issue Jul 14, 2020 · 5 comments
Labels
J-awaiting answer Question asked of user; a reply moves it to triage again

Comments

@ghost
Copy link

ghost commented Jul 14, 2020

🐛 Bug Report

https://github.com/SeleniumHQ/selenium/blob/trunk/py/selenium/webdriver/remote/webdriver.py#L106

get_remote_connection checks for browser_name
#8096 removed it from class

To Reproduce

Detailed steps to reproduce the behavior:

Expected behavior

A clear and concise description of what you expected to happen.

Test script or set of commands reproducing this issue

Please provide a test script to reproduce the issue you are reporting, if the
setup is more complex, GitHub repo links with are also OK.

Issues without a reproduction script are likely to stall and eventually be closed.

Environment

OS:
Browser:
Browser version:
Browser Driver version:
Language Bindings version:
Selenium Grid version (if applicable):

@ghost ghost added the A-needs-triaging A Selenium member will evaluate this soon! label Jul 14, 2020
@AutomatedTester
Copy link
Member

The tests are working, as in browser launch and automation happening, in the tree on our CI.

For issues please provide a concise reproducible test case and describe what results you are seeing and what results you expect.

See CONTRIBUTING.md

@AutomatedTester AutomatedTester added J-awaiting answer Question asked of user; a reply moves it to triage again and removed A-needs-triaging A Selenium member will evaluate this soon! labels Jul 14, 2020
@ghost
Copy link
Author

ghost commented Jul 16, 2020

see #7959

@AutomatedTester
Copy link
Member

closing as no new information has been given when asked. If you give an example of this not working I will reopen.

@ghost
Copy link
Author

ghost commented Jul 17, 2020

from selenium import webdriver
from selenium.webdriver.chromium.remote_connection import ChromiumRemoteConnection
from selenium.webdriver.firefox.remote_connection import FirefoxRemoteConnection

with webdriver.Remote("http://127.0.0.1:4444", webdriver.FirefoxOptions().to_capabilities()) as driver:
    print("FirefoxRemoteConnection?: ")
    print(isinstance(driver.command_executor,FirefoxRemoteConnection))
    
with webdriver.Remote("http://127.0.0.1:4444", webdriver.ChromeOptions().to_capabilities()) as driver:
    print("ChromiumRemoteConnection?: ")
    print(isinstance(driver.command_executor,ChromiumRemoteConnection))
FirefoxRemoteConnection?: 
True
ChromiumRemoteConnection?: 
False

@ggalan87
Copy link

I can confirm the issue, which is obvious... The constructor for ChromiumRemoteConnection expects vendor_prefix and browser_name which for that case in the following line are not passed:

return handler(command_executor, keep_alive=keep_alive)

I don't know which fix should be preferred, either having same constructor signatures or specialized for each webbrowser, because I am not aware if such two keywords are anyway probable to be different than vendor_prefix='goog', browser_name='chromium'.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J-awaiting answer Question asked of user; a reply moves it to triage again
Projects
None yet
Development

No branches or pull requests

2 participants