Skip to content

Commit a8ac8f2

Browse files
authored
Merge pull request #658 from seleniumbase/opera-chromium-updates
Make improvements to Opera Chromium automation
2 parents c3ec848 + 9beb997 commit a8ac8f2

File tree

17 files changed

+124
-55
lines changed

17 files changed

+124
-55
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ Tests are run with "pytest". Browsers are controlled by WebDriver.
6060
* [<img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=22AAEE" alt="Python:2.7|3.5|3.6|3.7|3.8" />](https://www.python.org/downloads/)
6161
* A [Python virtual env](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) is recommended. <i><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">See shortcut</a>.</i>
6262
* Upgrade **[pip](https://pypi.org/project/pip/)** to prevent warnings:
63-
64-
```bash
65-
python -m pip install -U pip
66-
```
63+
-- macOS/Linux: ``python3 -m pip install -U pip``
64+
-- Windows(Cmd): ``py -m pip install -U pip``
6765

6866
<a id="install_seleniumbase"></a>
6967
<h2><img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" width="30" /> Install SeleniumBase:</h2>
@@ -315,7 +313,7 @@ SeleniumBase provides additional ``pytest`` command-line options for tests:
315313
--agent=STRING # (Modify the web browser's User-Agent string.)
316314
--mobile # (Use the mobile device emulator while running tests.)
317315
--metrics=STRING # (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
318-
--extension-zip=ZIP # (Load a Chrome Extension .zip file, comma-separated.)
316+
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
319317
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
320318
--headless # (Run tests headlessly. Default mode on Linux OS.)
321319
--headed # (Run tests with a GUI on Linux OS.)

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
livereload==2.6.2;python_version>="3.6"
22
pymdown-extensions==8.0
33
mkdocs==1.1.2
4-
mkdocs-material==5.5.6
4+
mkdocs-material==5.5.7
55
mkdocs-simple-hooks==0.1.1
66
mkdocs-material-extensions==1.0
77
mkdocs-minify-plugin==0.3.0

examples/offline_examples/demo_page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
</style>
251251
</head>
252252
<body>
253+
<!-- Tested with SeleniumBase - https://seleniumbase.io -->
253254
<form id="myForm">
254255
<table id="myTable" style="width: 780px; padding: 10px;">
255256
<tbody id="tbodyId">

help_docs/customizing_test_runs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ SeleniumBase provides additional ``pytest`` command-line options for tests:
109109
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use authenticated proxy server.)
110110
--mobile # (Use the mobile device emulator while running tests.)
111111
--metrics=STRING # (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
112-
--extension-zip=ZIP # (Load a Chrome Extension .zip file, comma-separated.)
112+
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
113113
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
114114
--headless # (Run tests headlessly. Default mode on Linux OS.)
115115
--headed # (Run tests with a GUI on Linux OS.)

help_docs/virtualenv_instructions.md

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
(*Shortcut*: Run "``source virtualenv_install.sh``" from the top-level SeleniumBase folder to perform the following steps.)
88

99
```bash
10-
python -m pip install --upgrade virtualenv
11-
python -m pip install --upgrade virtualenvwrapper
10+
python3 -m pip install pip wheel --force-reinstall
11+
python3 -m pip install virtualenvwrapper --force-reinstall
1212
export WORKON_HOME=$HOME/.virtualenvs
1313
source `which virtualenvwrapper.sh`
1414
```
@@ -20,52 +20,81 @@ If you add ``source `which virtualenvwrapper.sh` `` to your local bash file (``~
2020
(*Shortcut*: Run "``virtualenv_install.bat``" from the top-level SeleniumBase folder to perform the following steps.)
2121

2222
```bash
23-
python -m pip install --upgrade virtualenvwrapper-win
23+
py -m pip install pip wheel --force-reinstall --user
24+
py -m pip install virtualenvwrapper-win --force-reinstall --user
2425
```
2526

2627
### Step 2: Create a virtual environment:
2728

28-
### macOS / Linux / Windows:
29+
### macOS / Linux:
30+
31+
* Using ``mkvirtualenv`` (any version of Python):
32+
```bash
33+
mkvirtualenv sbase_env
34+
```
35+
(If you have multiple versions of Python installed on your machine, and you want your virtual environment to use a specific Python version, add ``--python=PATH_TO_PYTHON_EXE`` with the Python executable to use.)
36+
37+
* (Python 2) Using ``virtualenv``:
38+
```bash
39+
virtualenv sbase_env
40+
source sbase_env/bin/activate
41+
```
42+
43+
* (Python 3) Using ``python3 -m venv``:
44+
```bash
45+
python3 -m venv sbase_env
46+
source sbase_env/bin/activate
47+
```
2948

30-
* Using ``mkvirtualenv``:
49+
### Windows:
50+
51+
* Using ``mkvirtualenv`` (any version of Python):
3152
```bash
32-
mkvirtualenv seleniumbase_venv
53+
mkvirtualenv sbase_env
3354
```
3455
(If you have multiple versions of Python installed on your machine, and you want your virtual environment to use a specific Python version, add ``--python=PATH_TO_PYTHON_EXE`` with the Python executable to use.)
3556

36-
* Using ``virtualenv``:
57+
* (Python 2) Using ``virtualenv``:
3758
```bash
38-
virtualenv seleniumbase_venv
39-
source seleniumbase_venv/bin/activate
59+
virtualenv sbase_env
60+
call sbase_env\\Scripts\\activate
4061
```
4162

42-
* (Python 3) Using ``mvenv``:
63+
* (Python 3) Using ``py -m venv``:
4364
```bash
44-
python3 -mvenv seleniumbase_venv
45-
source seleniumbase_venv/bin/activate
65+
py -m venv sbase_env
66+
call sbase_env\\Scripts\\activate
4667
```
4768

4869
---
4970

50-
If you ever need to leave your virtual environment, use the following command:
71+
### mkvirtualenv Commands
72+
73+
Creating a virtual environment:
74+
75+
```bash
76+
mkvirtualenv sbase_env
77+
```
78+
79+
Leaving your virtual environment:
5180

5281
```bash
5382
deactivate
5483
```
5584

56-
You can always jump back into your virtual environment later:
85+
Returning to a virtual environment:
5786

5887
```bash
59-
workon seleniumbase_venv
88+
workon sbase_env
6089
```
6190

62-
To list all existing virtual environments:
91+
Listing all virtual environments:
6392

6493
```bash
6594
lsvirtualenv
6695
```
6796

68-
To delete a virtual environment:
97+
Deleting a virtual environment:
6998

7099
```bash
71100
rmvirtualenv VIRTUAL_ENV_NAME

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ markdown_extensions:
2424
# Configuration
2525
theme:
2626
name: material
27-
logo: https://seleniumbase.io/cdn/img/sb_logo_dh.png
27+
logo: img/logo3a.png
2828
favicon: img/logo3a.png
2929
include_homepage_in_sidebar: true
3030
sticky_navigation: true

seleniumbase/console_scripts/ReadMe.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ See: http://www.katalon.com/automation-recorder
106106

107107
* Options:
108108
``-n`` (Add line Numbers to the rows)
109-
``-w`` (Use word-Wrap for long lines)
110109

111110
* Output:
112111
Prints the code/text of any file

seleniumbase/console_scripts/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ def show_print_usage():
202202
print(" OR: sbase print [FILE] [OPTIONS]")
203203
print(" Options:")
204204
print(" -n (Add line Numbers to the rows)")
205-
print(" -w (Use word-Wrap for long lines)")
206205
print(" Output:")
207206
print(" Prints the code/text of any file")
208207
print(" with syntax-highlighting.")

seleniumbase/console_scripts/sb_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
DEFAULT_CHROMEDRIVER_VERSION = "2.44"
4343
DEFAULT_GECKODRIVER_VERSION = "v0.26.0"
4444
DEFAULT_EDGEDRIVER_VERSION = "84.0.522.59"
45-
DEFAULT_OPERADRIVER_VERSION = "v.81.0.4044.113"
45+
DEFAULT_OPERADRIVER_VERSION = "v.84.0.4147.89"
4646

4747

4848
def invalid_run_command():

seleniumbase/console_scripts/sb_print.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
OR: sbase print [FILE] [OPTIONS]
77
Options:
88
-n (Add line Numbers to the rows)
9-
-w (Use word-Wrap for long lines)
109
Output:
1110
Prints the code/text of any file
1211
with syntax-highlighting.
@@ -24,7 +23,6 @@ def invalid_run_command(msg=None):
2423
exp += " OR: sbase print [FILE] [OPTIONS]\n"
2524
exp += " Options:\n"
2625
exp += " -n (Add line Numbers to the rows)\n"
27-
exp += " -w (Use word-Wrap for long lines)\n"
2826
exp += " Output:\n"
2927
exp += " Prints the code/text of any file\n"
3028
exp += ' with syntax-highlighting.\n'
@@ -67,7 +65,7 @@ def main():
6765
c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
6866
cr = colorama.Style.RESET_ALL
6967
line_numbers = False
70-
word_wrap = False
68+
word_wrap = True # Always use word wrap now
7169
help_me = False
7270
invalid_cmd = None
7371
is_python_file = False

0 commit comments

Comments
 (0)