Skip to content

Commit f069c57

Browse files
authored
Merge pull request #122 from seleniumbase/chrome-full-screen-mode
Improvements for running tests in Chrome
2 parents 31e90ff + 7045543 commit f069c57

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ SeleniumBase includes an automated/manual hybrid solution called **[MasterQA](ht
9494

9595
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:
9696

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

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

@@ -116,6 +116,12 @@ Mac:
116116
brew install chromedriver phantomjs
117117
```
118118

119+
(NOTE: If your existing version of chromedriver is less than 2.32, **you must upgrade!**)
120+
121+
```bash
122+
brew upgrade chromedriver
123+
```
124+
119125
* To verify that the web drivers are working, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.
120126

121127

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pip>=9.0.1
2-
setuptools>=36.3.0
2+
setuptools>=36.5.0
33
ipython==5.4.1
4-
selenium==3.5.0
4+
selenium==3.6.0
55
nose==1.3.7
66
pytest==3.2.1
77
pytest-html==1.15.2

seleniumbase/config/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
# Called after each wait_for_ready_state_complete()
7373
WAIT_FOR_ANGULARJS = False
7474

75+
# Option to start Chrome in full screen mode by default
76+
START_CHROME_IN_FULL_SCREEN_MODE = False
77+
7578

7679
# #####>>>>>----- MasterQA SETTINGS -----<<<<<#####
7780
# ##### (Used when importing MasterQA as the parent class)

seleniumbase/core/browser_launcher.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from selenium import webdriver
22
from selenium.common.exceptions import WebDriverException
33
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
4+
from seleniumbase.config import settings
45
from seleniumbase.core import download_helper
56
from seleniumbase.fixtures import constants
67

@@ -77,6 +78,12 @@ def get_driver(browser_name):
7778
chrome_options.add_experimental_option("prefs", prefs)
7879
chrome_options.add_argument("--allow-file-access-from-files")
7980
chrome_options.add_argument("--allow-running-insecure-content")
81+
chrome_options.add_argument("--disable-infobars")
82+
if settings.START_CHROME_IN_FULL_SCREEN_MODE:
83+
# Run Chrome in full screen mode on WINDOWS
84+
chrome_options.add_argument("--start-maximized")
85+
# Run Chrome in full screen mode on MAC/Linux
86+
chrome_options.add_argument("--kiosk")
8087
return webdriver.Chrome(chrome_options=chrome_options)
8188
except Exception:
8289
return webdriver.Chrome()

server_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pip>=9.0.1
2-
setuptools>=36.3.0
2+
setuptools>=36.5.0
33
ipython==5.4.1
44
selenium==2.53.6
55
nose==1.3.7

server_setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='seleniumbase',
11-
version='1.4.5',
11+
version='1.4.6',
1212
description='Test Automation Framework - http://seleniumbase.com',
1313
long_description='Automation Framework for Simple & Reliable Web Testing',
1414
platforms='Mac * Windows * Linux * Docker',
@@ -19,7 +19,7 @@
1919
license='The MIT License',
2020
install_requires=[
2121
'pip>=9.0.1',
22-
'setuptools>=36.3.0',
22+
'setuptools>=36.5.0',
2323
'ipython==5.4.1',
2424
'selenium==2.53.6',
2525
'nose==1.3.7',

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name='seleniumbase',
10-
version='1.4.5',
10+
version='1.4.6',
1111
description='Test Automation Framework - http://seleniumbase.com',
1212
long_description='Automation Framework for Simple & Reliable Web Testing',
1313
platforms='Mac * Windows * Linux * Docker',
@@ -18,9 +18,9 @@
1818
license='The MIT License',
1919
install_requires=[
2020
'pip>=9.0.1',
21-
'setuptools>=36.3.0',
21+
'setuptools>=36.5.0',
2222
'ipython==5.4.1',
23-
'selenium==3.5.0',
23+
'selenium==3.6.0',
2424
'nose==1.3.7',
2525
'pytest==3.2.1',
2626
'pytest-html==1.15.2',

0 commit comments

Comments
 (0)