Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cd063f9

Browse files
authored
Merge branch 'trunk' into renovate/gradle-8.x
2 parents e6f51c0 + 477248d commit cd063f9

File tree

5 files changed

+86
-30
lines changed

5 files changed

+86
-30
lines changed

examples/python/README.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,61 @@
1-
# Running all tests from Selenium python example
1+
# Running tests from Selenium Python examples
22

3-
Follow these steps to run all test example from selenium python
4-
5-
1. Clone this repository
3+
#### 1. Clone this repository
64

75
```
86
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
97
```
108

11-
2. Navigate to `python` directory
9+
#### 2. Navigate to `python` directory
1210

1311
```
1412
cd seleniumhq.github.io/examples/python
1513
```
1614

17-
3. Install dependencies using pip
15+
#### 3. Create a virtual environment
16+
17+
- On Windows:
18+
19+
```
20+
py -m venv venv
21+
venv\Scripts\activate
22+
```
23+
24+
- On Linux/Mac:
25+
26+
```
27+
python3 -m venv venv
28+
source venv/bin/activate
29+
```
30+
31+
#### 4. Install dependencies:
1832

1933
```
2034
pip install -r requirements.txt
2135
```
22-
> if you are on a different python version, for example python3.x you may have to replace `pip` with `pip3`
2336

24-
4. Run all tests
37+
> for help, see: https://packaging.python.org/en/latest/tutorials/installing-packages
38+
39+
#### 5. Run tests
40+
41+
- Run all tests with the default Python interpreter:
2542

2643
```
2744
pytest
2845
```
2946

30-
> Please keep some patience - If you are doing it for the first time, it will take a little while to verify and download the browser drivers
47+
- Run all tests with every installed/supported Python interpreter:
3148

32-
## Execute a specific example
33-
To run a specific Selenium Python example, use the following command:
34-
```bash
49+
```
50+
tox
51+
```
52+
53+
> Please have some patience - If you are doing it for the first time, it will take a little while to download the browser drivers
54+
55+
- Run a specific example:
56+
57+
```
3558
pytest path/to/test_script.py
3659
```
3760

38-
Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run.
61+
> Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run

examples/python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pytest-trio==0.8.0
55
pytest-rerunfailures==15.0
66
flake8==7.2.0
77
requests==2.32.3
8+
tox==4.25.0

examples/python/tox.ini

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Tox (https://tox.wiki/) is a tool for running tests in multiple
2+
# virtualenvs. This configuration file will run the test suite on all
3+
# supported python versions. To use it, run "tox" from this directory.
4+
#
5+
# For a specific environment, run: "tox -e <env>" (i.e.: "tox -e py313")
6+
#
7+
# This tox configuration will skip any Python interpreters that can't be found.
8+
# To manage multiple Python interpreters for covering all versions, you can use
9+
# pyenv: https://github.com/pyenv/pyenv
10+
11+
12+
[tox]
13+
env_list =
14+
py39
15+
py310
16+
py311
17+
py312
18+
py313
19+
skip_missing_interpreters = True
20+
21+
[testenv]
22+
description = run tests
23+
passenv = *
24+
deps =
25+
-r requirements.txt
26+
commands =
27+
# "-vv" means extra verbose
28+
# "-r fEsxXp" means show extra test summary info as specified by:
29+
# (f)ailed, (E)rror, (s)kipped, (x)failed, (X)passed, (p)assed
30+
pytest -vv -r fEsxXp {posargs:.}

website_and_docs/content/documentation/grid/components.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Serenium Grid のコンポーネント"
2+
title: "Selenium Grid のコンポーネント"
33
linkTitle: "コンポーネント"
44
weight: 6
55
description: >

website_and_docs/content/documentation/webdriver/bidi/logging.zh-cn.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
---
2-
title: "WebDriver BiDi Logging Features"
3-
linkTitle: "Logging"
2+
title: "WebDriver BiDi 日志功能"
3+
linkTitle: "日志"
44
weight: 1
55
description: >
6-
These features are related to logging. Because "logging" can refer to so many
7-
different things, these methods are made available via a "script" namespace.
6+
这些功能与日志记录有关。
7+
由于"logging"可以指代许多不同的事物,
8+
因此这些方法通过"script"命名空间提供.
89
aliases: [
910
"/documentation/zh-cn/webdriver/bidirectional/bidirectional_w3c/log",
1011
"/documentation/webdriver/bidirectional/webdriver_bidi/log"
1112
]
1213
---
1314

14-
Remember that to use WebDriver BiDi, you must enable it in Options.
15-
For more details, see [Enabling BiDi]({{< ref "BiDi" >}})
15+
请记住, 要使用 WebDriver BiDi,
16+
您必须在选项中启用它.
17+
更多详情, 请参阅 [启用 BiDi]({{< ref "BiDi" >}}) .
1618

17-
## Console Message Handlers
19+
## 控制台消息处理程序
1820

19-
Record or take actions on `console.log` events.
21+
记录或对 `console.log` 事件采取行动.
2022

21-
### Add Handler
23+
### 添加处理程序
2224

2325
{{< tabpane text=true >}}
2426
{{< tab header="Java" >}}
@@ -41,9 +43,9 @@ Record or take actions on `console.log` events.
4143
{{< /tab >}}
4244
{{< /tabpane >}}
4345

44-
### Remove Handler
46+
### 删除处理程序
4547

46-
You need to store the ID returned when adding the handler to delete it.
48+
您需要存储添加处理程序时返回的 ID 以便将其删除.
4749

4850
{{< tabpane text=true >}}
4951
{{< tab header="Java" >}}
@@ -66,11 +68,11 @@ You need to store the ID returned when adding the handler to delete it.
6668
{{< /tab >}}
6769
{{< /tabpane >}}
6870

69-
## JavaScript Exception Handlers
71+
## JavaScript 异常处理程序
7072

71-
Record or take actions on JavaScript exception events.
73+
记录或对 JavaScript 异常事件采取行动.
7274

73-
### Add Handler
75+
### 添加处理程序
7476

7577
{{< tabpane text=true >}}
7678
{{< tab header="Java" >}}
@@ -93,9 +95,9 @@ Record or take actions on JavaScript exception events.
9395
{{< /tab >}}
9496
{{< /tabpane >}}
9597

96-
### Remove Handler
98+
### 删除处理程序
9799

98-
You need to store the ID returned when adding the handler to delete it.
100+
您需要存储添加处理程序时返回的 ID 以便将其删除.
99101

100102
{{< tabpane text=true >}}
101103
{{< tab header="Java" >}}

0 commit comments

Comments
 (0)