-
Notifications
You must be signed in to change notification settings - Fork 763
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
Add service class #1902
Merged
Merged
Add service class #1902
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Working on an issue with the Options class gave me deeper insight into how it was working. Brought that experience over to the Service class. Thjis is an initial implementation / rewrite of the Service class. It follows more closely the options class. There is just the one test for now and I see I need to bring in the service argument into Open Browser but this feels like a good start.
… browsers The is just an in ititial commit with some changes which bring the service class down to the point where we create/instantiate the webdrivers for the for the various browsers. Still need some work to actually use what the user provides and to test this code.
Although I have completed the intial implementation of the service class and it's usage, I have discovered unlike the selenium options most if not all of the attributes must be set on the instantiate of the class. So need to rework the parsing (should check signature instead of attributes) and then construct the class with these parameters.
Some minor changes which I want to store away. Starting to see the final version of this code. Also started to add a test case copied from the options test. All this is a work in progress.
It is almost complete but still something wrong with how I am instatiating the service class with the parsed arguments. Cleaned up the Service class and added a test case where I wasn't trying to set the driver path (which is a bad idea to use a made up one because the test fails in the the chromedriver wouldn't start).
Update some of the atests. Need to add some unit tests and make sure service class is getting passed in. Need to deprecate and guide users away from service_log_path and executable_path.
All but the Chrome needed to have service class added. Now need to figure out how to handle one using the deprecated service_log_path and executable_path arguments.
…le_browsers_service.robot
A major overhaul of the keyword documentation for `Open Browser`. - Added some deprecation warnings for ``service_log_path`` and ``executable_path`` options. Also noted that the already deprecated ``desired_capabilities`` will be removed in the next release. - Removed note about partial support for options as it is now full support. - Moved majority of options description up to the main library documentation. - Reshuffled examples and put them closery to the arguments they demonstarte. - Removed many of the "this feature was added in version x" messages as they are very old changes.
My method for parsing out the argument does not allow for spaces. I want to revist this but in the meantime going to exclude that test. Also corrected unit test which checked the plug in documentation. As I update the library intro section this was failing. Not sure why it was not failing in GitHub Actions .. either I hadn't pushed or maybe had not yet checked that yet ..
aaltat
approved these changes
May 18, 2024
# service = importlib.import_module(f"selenium.webdriver.{browser}.service") | ||
# return service.Service | ||
class SeleniumService: | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty doc string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings in the Service class into the Open Browser keyword.