Skip to content

Removed strict version dependency to selenium#109

Open
EmanueleCannizzaro wants to merge 3 commits into
mherrmann:masterfrom
EmanueleCannizzaro:master
Open

Removed strict version dependency to selenium#109
EmanueleCannizzaro wants to merge 3 commits into
mherrmann:masterfrom
EmanueleCannizzaro:master

Conversation

@EmanueleCannizzaro

Copy link
Copy Markdown

Update the chromedriver for linux to latest available

Update the chromedriver for linux to latest available
@CLAassistant

CLAassistant commented Jun 6, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@EmanueleCannizzaro

Copy link
Copy Markdown
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

Comment thread helium/_impl/selenium_wrappers.py Outdated
# 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
Copy Markdown
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
Copy Markdown
Author

Choose a reason for hiding this comment

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

Okay!

Comment thread setup.py
install_requires = [
# Also update requirements/base.txt when you make changes here.
'selenium==3.141.0'
'selenium>=3.141.0'

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread setup.py
],
test_suite='tests'
) No newline at end of file
)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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