Skip to content

Commit

Permalink
Merge 5f8a438 into 9637b18
Browse files Browse the repository at this point in the history
  • Loading branch information
rgonalo committed Jan 4, 2019
2 parents 9637b18 + 5f8a438 commit 2314c8d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,13 @@
Toolium Changelog
=================

v1.5.0
------

*Release date: WIP*

- Add `username` and `password` config properties in [Server] section to enable basic authentication in Selenium Grid (required by GGR)

v1.4.3
------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.4.3
1.5.0.dev0
10 changes: 10 additions & 0 deletions docs/remote_configuration.rst
Expand Up @@ -13,6 +13,8 @@ section in properties.cfg file::
enabled: true
host: SERVER_IP
port: SERVER_PORT
username: SERVER_USERNAME
password: SERVER_PASSWORD
video_enabled: false
logs_enabled: false

Expand All @@ -29,6 +31,14 @@ port
~~~~
| Port number where server is listening
username
~~~~~~~~
| Username that is passed to Selenium Grid hub when it requires basic authentication, like in GGR
password
~~~~~~~~
| Password that is passed to Selenium Grid hub when it requires basic authentication, like in GGR
video_enabled
~~~~~~~~~~~~~
| This property is only valid using `Selenium Grid Extras <https://github.com/groupon/Selenium-Grid-Extras>`_ as
Expand Down
5 changes: 4 additions & 1 deletion toolium/config_driver.py
Expand Up @@ -76,7 +76,10 @@ def _create_remote_driver(self):
# Get server url
server_host = self.config.get('Server', 'host')
server_port = self.config.get('Server', 'port')
server_url = 'http://{0}:{1}/wd/hub'.format(server_host, server_port)
server_username = self.config.get_optional('Server', 'username')
server_password = self.config.get_optional('Server', 'password')
server_auth = '{}:{}@'.format(server_username, server_password) if server_username and server_password else ''
server_url = 'http://{}{}:{}/wd/hub'.format(server_auth, server_host, server_port)

# Get driver capabilities
driver_type = self.config.get('Driver', 'type')
Expand Down

0 comments on commit 2314c8d

Please sign in to comment.