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

Accept all valid arguments for Remote WebDriver #734

Merged
merged 2 commits into from
Nov 28, 2019

Conversation

jsfehler
Copy link
Collaborator

This changes the Remote Browser from accepting desired capabilities in the keyword args to accepting anything and sending to Remote Webdriver as keyword args. As a result, desired capabilities are now sent as a dictionary instead of keyword args.

Documentation updated to reflect the new behaviour.

Comment on lines 36 to 41
if not kwargs.get('desired_capabilities'):
kwargs['desired_capabilities'] = caps
else:
# Combine user's desired capabilities with default
caps.update(kwargs['desired_capabilities'])
kwargs['desired_capabilities'] = caps
Copy link
Member

Choose a reason for hiding this comment

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

This code can be simplified:

        if kwargs.get('desired_capabilities'):
            # Combine user's desired capabilities with default
            caps.update(kwargs['desired_capabilities'])
        kwargs['desired_capabilities'] = caps

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@andrewsmedina Good catch. Fixed.

@andrewsmedina andrewsmedina merged commit 282e828 into cobrateam:master Nov 28, 2019
@andrewsmedina
Copy link
Member

@jsfehler thanks for contribute

@jsfehler jsfehler deleted the remote_args branch December 3, 2019 16:40
cheezeygeek added a commit to cheezeygeek/splinter that referenced this pull request Jan 30, 2020
* Fix Firefox headless mode to handle custom firefox_binary option (cobrateam#714)

* Firefox headless mode handles custom firefox_binary option, if it is set

* Use six to handle Python 2/3 compatibility

* How to fill in complex text values (cobrateam#716)

* Fix Firefox driver to respect headless option in subsequent calls (cobrateam#715)

* Firefox headless mode handles custom firefox_binary option, if it is set

* Use six to handle Python 2/3 compatibility

* Fix Firefox driver to respect headless option in subsequent calls

* Fix the test to explicitly launch browser in headless mode

* Browser.get_alert() returns None if no alert exists (cobrateam#717)

* Adds code highlight to the README.rst (cobrateam#720)

* add in docs the possibility to use selenium (cobrateam#722)

* added docs for is_element_visible methods (cobrateam#723)

* Retry WebElement.click if ElementClickInterceptedException or WebDriverException is thrown (cobrateam#725)

* find_by_x methods in WebDriverElement now uses retry mechanism (cobrateam#727)

* Fixed dead external links (cobrateam#731)

* Fixed dead external links

* Fixed more dead in docs/community.rst

* is_not_present/visible returns True immediately after not finding anything (cobrateam#732)

* Update version of Firefox and geckodriver used for tests (cobrateam#737)

* Accept all valid arguments for Remote WebDriver (cobrateam#734)

* Accept all valid arguments for Remote WebDriver

* fixup

* Allow ActionChains when using Remote WebDriver (cobrateam#738)

* add docs about 0.12.0

* setup: bump to 0.12.0

* docs for 0.12.0

* removing circle ci config

* Patch Remote WebDriver to add retry attempts. Add retry to Browser init. (cobrateam#742)

* Refactor forward/back tests to run in isolation (cobrateam#741)

* Add driver attribute to WebDriverElement (cobrateam#740)

* use python 3.8 instead 3.8-3.8-3.8-dev

* Fix WebElement.select and .select_by_text to search only inside the parent element (cobrateam#729)

* Refactor some chrome/firefox tests to use pytest (cobrateam#735)

* find_by with 0 second wait_time only checks once (cobrateam#739)

* Fix FlaskClient redirects (cobrateam#721)

* Fix FlaskClient redirects (cobrateam#515)

Update to the `FlaskClient` driver to make 302/303 redirects behave as
expected (e.g to use GET to request the location in the resposne) and to
ensure that data submit using GET is done so as arguments in the URL
instead of through the `data` argument.

* Add test for Flask redirect of POST response (cobrateam#515)

* WebDriverElement find_by_x methods now take wait_time argument (cobrateam#744)

* add docs about 0.13.0 release

* setup: bump to 0.13.0

* make find_by_value works with btn elements (cobrateam#746)

* make find_by_value works with btn elements

closes cobrateam#274

* fix find_by_value for button elements for zope

* fix find_by_value in chrome

* Fix: Incorrect error thrown when missing chrome/geckodriver (cobrateam#749)

* Fix scenario where incorrect error is thrown when missing chrome/geckodriver

* Fixup

* add a test to ensure that cobrateam#361 is already fixed

* fix test in python3

Co-authored-by: Kasse Korhonen <[email protected]>
Co-authored-by: Mikko Ohtamaa <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
Co-authored-by: George <[email protected]>
Co-authored-by: sukhbeersingh <[email protected]>
Co-authored-by: Joshua Fehler <[email protected]>
Co-authored-by: Johan Niklasson <[email protected]>
Co-authored-by: Andrews Medina <[email protected]>
Co-authored-by: Laurence de Bruxelles <[email protected]>
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.

2 participants