Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.4
0.5.4.1
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
# built documents.
#
# The short X.Y version.
version = '0.5.4'
version = '0.5.4.1'
# The full version, including alpha/beta/rc tags.
release = '0.5.4'
release = '0.5.4.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
23 changes: 23 additions & 0 deletions docs/drivers/chrome.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,29 @@ the ``Browser`` instance:

**Note:** if you have trouble with ``$HOME/.bash_profile``, you can try ``$HOME/.bashrc``.

Using emulation mode in Chrome
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Chrome options can be passed to customize Chrome's behaviour; it is then possible to leverage the
experimental emulation mode.

.. highlight:: python

::

from selenium import webdriver
from splinter import Browser

mobile_emulation = {"deviceName": "Google Nexus 5"}
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("mobileEmulation",
mobile_emulation)
browser = Browser('chrome', options=chrome_options)


refer to `chrome driver documentation <https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation>`_


API docs
--------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='splinter',
version='0.5.4',
version='0.5.4.1',
description='browser abstraction for web acceptance testing',
long_description=README,
author='CobraTeam',
Expand Down
2 changes: 1 addition & 1 deletion splinter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

__version__ = '0.5.4'
__version__ = '0.5.4.1'
from splinter.browser import Browser
4 changes: 2 additions & 2 deletions splinter/driver/webdriver/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class WebDriver(BaseWebDriver):

driver_name = "Chrome"

def __init__(self, user_agent=None, wait_time=2, **kwargs):
options = Options()
def __init__(self, options=None, user_agent=None, wait_time=2, **kwargs):
options = Options() if options is None else options

if user_agent is not None:
options.add_argument("--user-agent=" + user_agent)
Expand Down