Skip to content

Commit 77b25c7

Browse files
authored
Merge pull request #316 from seleniumbase/update-firefox-settings
Update Firefox profile settings
2 parents 6205ed0 + 73d96fe commit 77b25c7

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pytest my_first_test.py --demo_mode
1818
```
1919
git clone https://github.com/seleniumbase/SeleniumBase.git
2020
cd SeleniumBase
21-
pip install .
21+
pip install -e .
2222
```
2323

2424
You can also install SeleniumBase from [PyPI](https://pypi.python.org/pypi/seleniumbase): [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)
@@ -235,6 +235,11 @@ pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1
235235
```
236236

237237

238+
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **Building Guided Tours for Websites:**
239+
240+
Learn about [SeleniumBase Interactive Walkthroughs](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/tour_examples) (in the ``examples/tour_examples`` folder). It's great for prototyping a website onboarding experience. See the [Tours ReadMe](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md) for more details.
241+
242+
238243
<a id="utilizing_advanced_features"></a>
239244
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **Production Environments & Integrations:**
240245

examples/basic_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
class MyTestClass(BaseCase):
99

1010
def test_basic(self):
11-
self.open('https://xkcd.com/353/')
11+
self.open("https://xkcd.com/353/")
1212
self.click('a[rel="license"]')
13-
self.open('https://xkcd.com/1481/')
13+
self.open("https://xkcd.com/1481/")
1414
self.click("link=Blag")
15-
self.update_text('input#s', 'Robots!\n')
16-
self.open('https://xkcd.com/1319/')
15+
self.update_text("input#s", "Robots!\n")
16+
self.open("https://xkcd.com/1319/")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ chardet
77
unittest2
88
selenium==3.141.0
99
requests==2.21.0
10-
urllib3==1.24.1
10+
urllib3==1.24.2
1111
pytest>=4.4.1
1212
pytest-cov>=2.6.1
1313
pytest-forked>=1.0.2

seleniumbase/core/browser_launcher.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,17 @@ def _create_firefox_profile(
140140
profile.set_preference("pdfjs.disabled", True)
141141
profile.set_preference("app.update.auto", False)
142142
profile.set_preference("app.update.enabled", False)
143+
profile.set_preference("extensions.update.enabled", False)
144+
profile.set_preference("devtools.errorconsole.enabled", True)
145+
profile.set_preference(
146+
"datareporting.healthreport.logging.consoleEnabled", False)
147+
profile.set_preference("datareporting.healthreport.service.enabled", False)
148+
profile.set_preference(
149+
"datareporting.healthreport.service.firstRun", False)
150+
profile.set_preference("datareporting.healthreport.uploadEnabled", False)
151+
profile.set_preference("datareporting.policy.dataSubmissionEnabled", False)
152+
profile.set_preference(
153+
"datareporting.policy.dataSubmissionPolicyAccepted", False)
143154
if proxy_string:
144155
proxy_server = proxy_string.split(':')[0]
145156
proxy_port = proxy_string.split(':')[1]
@@ -156,6 +167,8 @@ def _create_firefox_profile(
156167
profile.set_preference("security.csp.enable", False)
157168
profile.set_preference(
158169
"browser.download.manager.showAlertOnComplete", False)
170+
profile.set_preference("browser.shell.checkDefaultBrowser", False)
171+
profile.set_preference("browser.startup.page", 0)
159172
profile.set_preference("browser.privatebrowsing.autostart", True)
160173
profile.set_preference("browser.download.panel.shown", False)
161174
profile.set_preference(

setup.py

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

1818
setup(
1919
name='seleniumbase',
20-
version='1.23.1',
20+
version='1.23.2',
2121
description='Reliable Browser Automation & Testing Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',
@@ -60,7 +60,7 @@
6060
'unittest2',
6161
'selenium==3.141.0',
6262
'requests==2.21.0', # Changing this may effect "urllib3"
63-
'urllib3==1.24.1', # Keep this lib in sync with "requests"
63+
'urllib3>=1.24.2,<1.25.0', # Keep this lib in sync with "requests"
6464
'pytest>=4.4.1',
6565
'pytest-cov>=2.6.1',
6666
'pytest-forked>=1.0.2',

0 commit comments

Comments
 (0)