Skip to content

Commit 5486dcf

Browse files
author
David Haeffner
committed
Updated code export docs
1 parent f66b64d commit 5486dcf

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

docs/introduction/code-export.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ This will place inline code comments in the exported file with details about the
2121

2222
## Supported Exports
2323

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
2529

2630
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.
2731

@@ -58,6 +62,40 @@ Here's a sample `pom.xml` to help you get started.
5862
</project>
5963
```
6064

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+
6199
## How To Contribute
62100

63101
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
72110

73111
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).
74112

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)).
76114

77115
### 2. Update the locators and commands
78116

20.9 KB
Loading

0 commit comments

Comments
 (0)