Skip to content

Improvements for running tests in Chrome #122

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

Merged
merged 5 commits into from
Oct 2, 2017
Merged
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ SeleniumBase includes an automated/manual hybrid solution called **[MasterQA](ht

To run automation on various web browsers, you'll need to download a driver file for each one and place it on your System **[PATH](http://java.com/en/download/help/path.xml)**. On a Mac, ``/usr/local/bin`` is a good spot. On Windows, make sure you set the System Path under Environment Variables to include the location where you placed the driver files:

* For Chrome, get [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) on your System Path.
* For Chrome, get [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) on your System Path. (**Version 2.32 or above required!**)

* For Firefox, get [Geckodriver](https://github.com/mozilla/geckodriver/releases) on your System Path.

Expand All @@ -116,6 +116,12 @@ Mac:
brew install chromedriver phantomjs
```

(NOTE: If your existing version of chromedriver is less than 2.32, **you must upgrade!**)

```bash
brew upgrade chromedriver
```

* To verify that the web drivers are working, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.


Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pip>=9.0.1
setuptools>=36.3.0
setuptools>=36.5.0
ipython==5.4.1
selenium==3.5.0
selenium==3.6.0
nose==1.3.7
pytest==3.2.1
pytest-html==1.15.2
Expand Down
3 changes: 3 additions & 0 deletions seleniumbase/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
# Called after each wait_for_ready_state_complete()
WAIT_FOR_ANGULARJS = False

# Option to start Chrome in full screen mode by default
START_CHROME_IN_FULL_SCREEN_MODE = False


# #####>>>>>----- MasterQA SETTINGS -----<<<<<#####
# ##### (Used when importing MasterQA as the parent class)
Expand Down
7 changes: 7 additions & 0 deletions seleniumbase/core/browser_launcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from seleniumbase.config import settings
from seleniumbase.core import download_helper
from seleniumbase.fixtures import constants

Expand Down Expand Up @@ -77,6 +78,12 @@ def get_driver(browser_name):
chrome_options.add_experimental_option("prefs", prefs)
chrome_options.add_argument("--allow-file-access-from-files")
chrome_options.add_argument("--allow-running-insecure-content")
chrome_options.add_argument("--disable-infobars")
if settings.START_CHROME_IN_FULL_SCREEN_MODE:
# Run Chrome in full screen mode on WINDOWS
chrome_options.add_argument("--start-maximized")
# Run Chrome in full screen mode on MAC/Linux
chrome_options.add_argument("--kiosk")
return webdriver.Chrome(chrome_options=chrome_options)
except Exception:
return webdriver.Chrome()
2 changes: 1 addition & 1 deletion server_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip>=9.0.1
setuptools>=36.3.0
setuptools>=36.5.0
ipython==5.4.1
selenium==2.53.6
nose==1.3.7
Expand Down
4 changes: 2 additions & 2 deletions server_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='seleniumbase',
version='1.4.5',
version='1.4.6',
description='Test Automation Framework - http://seleniumbase.com',
long_description='Automation Framework for Simple & Reliable Web Testing',
platforms='Mac * Windows * Linux * Docker',
Expand All @@ -19,7 +19,7 @@
license='The MIT License',
install_requires=[
'pip>=9.0.1',
'setuptools>=36.3.0',
'setuptools>=36.5.0',
'ipython==5.4.1',
'selenium==2.53.6',
'nose==1.3.7',
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='seleniumbase',
version='1.4.5',
version='1.4.6',
description='Test Automation Framework - http://seleniumbase.com',
long_description='Automation Framework for Simple & Reliable Web Testing',
platforms='Mac * Windows * Linux * Docker',
Expand All @@ -18,9 +18,9 @@
license='The MIT License',
install_requires=[
'pip>=9.0.1',
'setuptools>=36.3.0',
'setuptools>=36.5.0',
'ipython==5.4.1',
'selenium==3.5.0',
'selenium==3.6.0',
'nose==1.3.7',
'pytest==3.2.1',
'pytest-html==1.15.2',
Expand Down