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

Removed strict version dependency to selenium #109

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EmanueleCannizzaro
Copy link

Update the chromedriver for linux to latest available

Update the chromedriver for linux to latest available
@CLAassistant
Copy link

CLAassistant commented Jun 6, 2023

CLA assistant check
All committers have signed the CLA.

@EmanueleCannizzaro
Copy link
Author

I made minor changes to setup.py file to remove the strict version dependency to selenium and I have updated the chromedriver version for linux to the latest one available

# Selenium sometimes returns None. For robustness, we turn this into []:
return self.target.find_elements_by_css_selector(selector) or []
return self.target.find_elements(by, xpath) or []
#def find_elements_by_name(self, name):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the PR. But please don't have dead (commented-out) code in your PR. I will not ever have dead code in my repositories.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay!

@@ -13,7 +13,7 @@
packages = find_packages(exclude=['tests', 'tests.*']),
install_requires = [
# Also update requirements/base.txt when you make changes here.
'selenium==3.141.0'
'selenium>=3.141.0'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This permits Selenium 3.141.0. Will your By. changes still work with Selenium 3?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose that to support both major release, a version check must be added.

)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't unnecessarily change the white space. See https://gist.github.com/mherrmann/5ce21814789152c17abd91c0b3eaadca.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I immagine this is due to my editor settings.

@EmanueleCannizzaro
Copy link
Author

Hello Michael,

are you now happy with the pull request?
The changes allow the package to work with either Selenium 3 or 4.

@mherrmann
Copy link
Owner

I'm afraid the changes do not work for me. I have Selenium 4.10.0 and am getting:

  File "/home/michael/dev/helium/helium/_impl/__init__.py", line 112, in _start_chrome_driver
    result = Chrome(options=chrome_options, desired_capabilities=capabilities)
TypeError: __init__() got an unexpected keyword argument 'desired_capabilities'

Please see "Contributing" in https://github.com/mherrmann/selenium-python-helium#Contributing for how to run the tests and reproduce this for yourself. You'll manually need to install selenium==4.10.0 after pip install -Ur requirements/test.txt because your PR doesn't bump the Selenium version in requirements.

@nchantarotwong
Copy link

desired_capabilities is deprecated in Selenium 4, can only use browser options

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

Successfully merging this pull request may close these issues.

4 participants