You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/introduction/code-export.md
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,11 @@ This will place inline code comments in the exported file with details about the
21
21
22
22
## Supported Exports
23
23
24
-
Currently, export to Java is supported. Specifically, Java for JUnit.
24
+
Currently, export to the following languages and test frameworks is supported.
25
+
26
+
- Java JUnit
27
+
- JavaScript Mocha
28
+
- Python pytest
25
29
26
30
We intend to support all of the officially supported programming language bindings for Selenium (e.g., Java, JavaScript, C#, Python, and Ruby) in at least one testing framework for each language.
27
31
@@ -58,6 +62,40 @@ Here's a sample `pom.xml` to help you get started.
58
62
</project>
59
63
```
60
64
65
+
### JavaScript Mocha
66
+
67
+
The exported code for JavaScript Mocha is built to work with Node 10, Mocha 6.1.x, and the latest version of Selenium 4.
68
+
69
+
You should be able to take the exported JavaScript file and run it after installing these dependencies (e.g., with `npm install`).
70
+
71
+
Here's a sample `package.json` to help you get started.
72
+
73
+
```javascript
74
+
{
75
+
"dependencies": {
76
+
"mocha":"^6.1.4",
77
+
"selenium-webdriver":"^4.0.0-alpha.3"
78
+
}
79
+
}
80
+
```
81
+
82
+
### Python pytest
83
+
84
+
The exported code for Python pytest is built to work with Python 3, pytest 4.6.x, and the latest version of Selenium 4.
85
+
86
+
You should be able to take the exported JavaScript file and run it after installing these dependencies (e.g., with `pip3 install`).
87
+
88
+
Here's a sample `requirements.txt` to help you get started.
89
+
90
+
```
91
+
pytest == 4.6.3
92
+
selenium == 4.0.0a1
93
+
```
94
+
95
+
```sh
96
+
> pip3 install -r ./requirements.txt
97
+
```
98
+
61
99
## How To Contribute
62
100
63
101
Code export was built in a modular way to help enable contributions.
@@ -72,7 +110,7 @@ First, copy an existing language package (e.g., `packages/code-export-java-junit
72
110
73
111
Next, add the new package as a dependency to [the `package.json` in `code-export`](https://github.com/SeleniumHQ/selenium-ide/blob/c55c556ffc947fd3f6ee8ab317915c6f879a88dc/packages/code-export/package.json#L22).
74
112
75
-
Lastly, run `yarn` from the root of the project.
113
+
Lastly, run `yarn` from the root of the project, and then build the project using `yarn watch` (full details for getting a local build going are available [here](https://github.com/SeleniumHQ/selenium-ide/blob/v3/README.md)).
0 commit comments