Skip to content

Commit bbc418b

Browse files
authored
Merge pull request #140 from seleniumbase/settings-overhaul
Settings overhaul
2 parents 2f5ca62 + 554d6bb commit bbc418b

File tree

8 files changed

+45
-33
lines changed

8 files changed

+45
-33
lines changed

README.md

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

33
[![](https://img.shields.io/pypi/v/seleniumbase.svg)](https://pypi.python.org/pypi/seleniumbase) [![Build Status](https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master)](https://travis-ci.org/seleniumbase/SeleniumBase) [![Join the chat at https://gitter.im/seleniumbase/SeleniumBase](https://badges.gitter.im/seleniumbase/SeleniumBase.svg)](https://gitter.im/seleniumbase/SeleniumBase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

5-
**A Reliable Test Automation Framework**
5+
**Browser Automation & Testing Framework**
66

77
![](https://cdn2.hubspot.net/hubfs/100006/images/sb_demo.gif "SeleniumBase")
88

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
theme: jekyll-theme-cayman
22
title: SeleniumBase
3-
description: A Reliable Test Automation Framework
3+
description: Browser Automation & Testing Framework

help_docs/before_installation.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Mac:
2929
* On a Mac, you can install drivers more easily by using ``brew`` (aka ``homebrew``), but you have to install that first. [Brew installation instructions are here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/requirements_installation.md).
3030

3131
```bash
32-
brew install chromedriver phantomjs
32+
brew install chromedriver
3333
```
3434

3535
(NOTE: If your existing version of chromedriver is less than 2.32, **upgrading is recommended!**)
@@ -38,4 +38,20 @@ brew install chromedriver phantomjs
3838
brew upgrade chromedriver
3939
```
4040

41+
Linux:
42+
43+
```bash
44+
wget http://chromedriver.storage.googleapis.com/2.32/chromedriver_linux64.zip
45+
unzip chromedriver_linux64.zip
46+
mv chromedriver /usr/local/bin/
47+
chmod +x /usr/local/bin/chromedriver
48+
```
49+
50+
```bash
51+
wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz
52+
tar xvfz geckodriver-v0.19.1-linux64.tar.gz
53+
mv geckodriver /usr/local/bin/
54+
chmod +x /usr/local/bin/geckodriver
55+
```
56+
4157
* To verify that the web drivers are working, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.

help_docs/method_summary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ self.save_screenshot(name, folder=None)
222222
########
223223

224224
self.check_assert_element(selector, by=By.CSS_SELECTOR,
225-
timeout=settings.TINY_TIMEOUT)
225+
timeout=settings.MINI_TIMEOUT)
226226

227227
self.check_assert_text(text, selector, by=By.CSS_SELECTOR,
228-
timeout=settings.TINY_TIMEOUT)
228+
timeout=settings.MINI_TIMEOUT)
229229

230230
self.process_checks()
231231
```

help_docs/requirements_installation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ On WINDOWS, run the following command:
2727
python -m pip install -U pip setuptools
2828
```
2929

30-
If you're having any trouble with that, you can [GET PIP HERE](https://pip.pypa.io/en/latest/installing/).
30+
On LINUX / CentOS 7, run the following commands:
31+
```bash
32+
yum -y update
33+
yum -y install python-pip
34+
```
35+
36+
If you're having any trouble getting pip, you can [GET PIP HERE](https://pip.pypa.io/en/latest/installing/).
3137

3238
When done, make sure the location of pip is on your path, which is `$PATH` for Mac/Linux. (On Windows, it's the System Variables `Path` within System Environment Variables. Ex: Add "C:/Python27/Scripts/" to the end of the `Path` variable.)
3339

seleniumbase/config/settings.py

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,16 @@
99

1010
# #####>>>>>----- REQUIRED/IMPORTANT SETTINGS -----<<<<<#####
1111

12-
# Default seconds to wait for page elements to appear before performing actions
13-
TINY_TIMEOUT = 0.1
12+
# Default maximum time (in seconds) to wait for page elements to appear.
13+
# Different methods/actions in base_case.py use different timeouts.
14+
# If the element to be acted on does not appear in time, the test fails.
1415
MINI_TIMEOUT = 2
1516
SMALL_TIMEOUT = 6
1617
LARGE_TIMEOUT = 10
1718
EXTREME_TIMEOUT = 30
1819

19-
# Default time to wait after each browser action performed during Demo Mode
20-
# Use Demo Mode when you want others to see what your automation is doing
21-
# Usage: --demo_mode when run from the command line when using --with-selenium
22-
# This value can be overwritten on the command line by using --demo_sleep=FLOAT
23-
DEFAULT_DEMO_MODE_TIMEOUT = 1.0
24-
25-
# Number of times to repeat the highlight animation. (Seen during Demo Mode)
26-
# Each loop is about 0.18 seconds.
27-
# This value can be overwritten on the command line by using --highlights=TIMES
28-
HIGHLIGHTS = 4
29-
3020
# If True, existing logs from past test runs will be saved and take up space.
3121
# If False, only the logs from the most recent test run will be saved locally.
32-
# This has no effect on Jenkins/S3/MySQL, which may still be saving test logs.
3322
ARCHIVE_EXISTING_LOGS = False
3423

3524
# If True, existing downloads from past runs will be saved and take up space.
@@ -44,38 +33,39 @@
4433
PAGE_SOURCE_NAME = "page_source.html"
4534

4635
# Default names for folders and files saved when reports are turned on.
47-
# Usage: "--report" (Also requires: "--with-testing_base")
48-
# These settings are also used with MasterQA
36+
# Usage: "--report" and "--with-testing_base" together. (NOSETESTS only)
4937
LATEST_REPORT_DIR = "latest_report"
5038
REPORT_ARCHIVE_DIR = "archived_reports"
5139
HTML_REPORT = "report.html"
5240
RESULTS_TABLE = "results_table.csv"
5341

5442
'''
5543
This adds wait_for_ready_state_complete() after various browser actions.
56-
By default, Selenium waits for the 'interactive' state before continuing.
5744
Setting this to True may improve reliability at the cost of speed.
58-
WARNING: Some websites are in a perpetual "interactive" state due to
59-
dynamic content that never fully finishes loading (Use "False" there).
6045
'''
6146
# Called after self.open(url) or self.open_url(url), NOT self.driver.open(url)
6247
WAIT_FOR_RSC_ON_PAGE_LOADS = True
6348
# Called after self.click(selector), NOT element.click()
6449
WAIT_FOR_RSC_ON_CLICKS = True
6550

6651
'''
67-
This adds wait_for_angularjs() after wait_for_ready_state_complete()
68-
after various browser actions. Setting this to True may improve reliability
69-
of AngularJs applications at the cost of speed.
70-
NOTE: This requires WAIT_FOR_RSC_ON_PAGE_LOADS and/or WAIT_FOR_RSC_ON_CLICKS
71-
to be True since it's part of wait_for_ready_state_complete().
52+
This adds wait_for_angularjs() after various browser actions.
53+
(Requires WAIT_FOR_RSC_ON_PAGE_LOADS and WAIT_FOR_RSC_ON_CLICKS to also be on.)
7254
'''
73-
# Called after each wait_for_ready_state_complete()
7455
WAIT_FOR_ANGULARJS = True
7556

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

60+
# Default time to wait after each browser action performed during Demo Mode.
61+
# Use Demo Mode when you want others to see what your automation is doing.
62+
# Usage: "--demo_mode". (Can be overwritten by using "--demo_sleep=TIME".)
63+
DEFAULT_DEMO_MODE_TIMEOUT = 1.0
64+
65+
# Number of times to repeat the demo_mode highlight animation.
66+
# Each loop is about 0.18 seconds. (Override by using "--highlights=TIMES".)
67+
HIGHLIGHTS = 4
68+
7969

8070
# #####>>>>>----- MasterQA SETTINGS -----<<<<<#####
8171
# ##### (Used when importing MasterQA as the parent class)

server_setup.py

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

99
setup(
1010
name='seleniumbase',
11-
version='1.5.3',
11+
version='1.5.4',
1212
description='Web Automation & Testing Framework - http://seleniumbase.com',
1313
long_description='Web Automation and Testing Framework - seleniumbase.com',
1414
platforms='Mac * Windows * Linux * Docker',

setup.py

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

99
setup(
1010
name='seleniumbase',
11-
version='1.5.3',
11+
version='1.5.4',
1212
description='Web Automation & Testing Framework - http://seleniumbase.com',
1313
long_description='Web Automation and Testing Framework - seleniumbase.com',
1414
platforms='Mac * Windows * Linux * Docker',

0 commit comments

Comments
 (0)