Skip to content

Commit 2c9d04d

Browse files
authored
Merge pull request #377 from seleniumbase/fix-issue-with-developer-extensions
Fix issue with Chrome developer extensions
2 parents c8910de + 8cf1fa2 commit 2c9d04d

File tree

6 files changed

+34
-19
lines changed

6 files changed

+34
-19
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ All-in-one testing framework for automated E2E tests, [assisted-QA](https://gith
1010
pytest my_first_test.py --demo_mode
1111
```
1212

13-
SeleniumBase uses [pytest](https://github.com/pytest-dev/pytest) for running Python scripts, while using [WebDriver](https://www.seleniumhq.org/) for controlling web browsers.
13+
SeleniumBase uses [pytest](https://github.com/pytest-dev/pytest) for running Python scripts, while using [Selenium WebDriver](https://www.seleniumhq.org/) for controlling web browsers.
1414

15-
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Quick Start:
15+
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Get Started:
1616

17-
You'll need **[Python](https://www.python.org/downloads/)** [<img src="https://img.shields.io/badge/python-2.7,_3.5,_3.6,_3.7+-22AADD.svg" alt=" " />](https://www.python.org/downloads/)
17+
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Install Python:
18+
19+
**[python.org/downloads/](https://www.python.org/downloads/)**
20+
[<img src="https://img.shields.io/badge/python-2.7,_3.5,_3.6,_3.7,_3.8+-22AADD.svg" alt=" " />](https://www.python.org/downloads/)
1821

1922
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Install/upgrade ``pip``:
2023

examples/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ To makes things easier, here's a simple GUI program that allows you to run a few
7979
```bash
8080
python gui_test_runner.py
8181
```
82-
<img src="https://cdn2.hubspot.net/hubfs/100006/images/gui_test_runner_py.png" title="GUI Test Runner">
82+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/gui_test_runner_py.png" title="GUI Test Runner" height="260">

seleniumbase/fixtures/base_case.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,8 +1285,9 @@ def get_new_driver(self, browser=None, headless=None,
12851285
extension_zip = self.extension_zip
12861286
if extension_dir is None:
12871287
extension_dir = self.extension_dir
1288-
if self.demo_mode or self.masterqa_mode:
1289-
disable_csp = True
1288+
# Due to https://stackoverflow.com/questions/23055651/ , skip extension
1289+
# if self.demo_mode or self.masterqa_mode:
1290+
# disable_csp = True
12901291
if cap_file is None:
12911292
cap_file = self.cap_file
12921293
valid_browsers = constants.ValidBrowsers.valid_browsers

seleniumbase/plugins/db_reporting_plugin.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import getpass
66
import time
77
import uuid
8-
from optparse import SUPPRESS_HELP
98
from nose.plugins import Plugin
109
from nose.exc import SkipTest
1110
from seleniumbase.core.application_manager import ApplicationManager
@@ -34,12 +33,20 @@ def __init__(self):
3433

3534
def options(self, parser, env):
3635
super(DBReporting, self).options(parser, env=env)
37-
parser.add_option('--database_environment', action='store',
36+
parser.add_option('--database_env', '--database-env',
37+
action='store',
3838
dest='database_env',
39-
choices=('production', 'qa', 'staging', 'develop',
40-
'test', 'local', 'master'),
41-
default='test',
42-
help=SUPPRESS_HELP)
39+
choices=(
40+
constants.Environment.QA,
41+
constants.Environment.STAGING,
42+
constants.Environment.DEVELOP,
43+
constants.Environment.PRODUCTION,
44+
constants.Environment.MASTER,
45+
constants.Environment.LOCAL,
46+
constants.Environment.TEST
47+
),
48+
default=constants.Environment.TEST,
49+
help="The database environment to run the tests in.")
4350

4451
def configure(self, options, conf):
4552
super(DBReporting, self).configure(options, conf)

seleniumbase/plugins/pytest_plugin.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
""" This is the pytest configuration file """
33

4-
import optparse
54
import pytest
65
import sys
76
from seleniumbase import config as sb_config
@@ -124,11 +123,16 @@ def pytest_addoption(parser):
124123
action='store',
125124
dest='database_env',
126125
choices=(
127-
'production', 'qa', 'staging', 'develop',
128-
'test', 'local', 'master'
126+
constants.Environment.QA,
127+
constants.Environment.STAGING,
128+
constants.Environment.DEVELOP,
129+
constants.Environment.PRODUCTION,
130+
constants.Environment.MASTER,
131+
constants.Environment.LOCAL,
132+
constants.Environment.TEST
129133
),
130-
default='test',
131-
help=optparse.SUPPRESS_HELP)
134+
default=constants.Environment.TEST,
135+
help="The database environment to run the tests in.")
132136
parser.addoption('--with-s3_logging', '--with-s3-logging',
133137
action="store_true",
134138
dest='with_s3_logging',
@@ -267,7 +271,7 @@ def pytest_addoption(parser):
267271
default=None,
268272
help="""Setting this overrides the default wait time
269273
before each MasterQA verification pop-up.""")
270-
parser.addoption('--disable_csp', '--disable-csp',
274+
parser.addoption('--disable_csp', '--disable-csp', '--no_csp', '--no-csp',
271275
action="store_true",
272276
dest='disable_csp',
273277
default=False,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
setup(
4747
name='seleniumbase',
48-
version='1.32.0',
48+
version='1.32.1',
4949
description='Fast, Easy, and Reliable Browser Automation & Testing.',
5050
long_description=long_description,
5151
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)