-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some docs on how to run the atoms tests
- selenium-4.27.1-python
- selenium-4.27.0
- selenium-4.26.1-python
- selenium-4.26.1-dotnet
- selenium-4.26.0
- selenium-4.25.0
- selenium-4.24.1-javascript
- selenium-4.24.0
- selenium-4.23.1-python
- selenium-4.23.1-java
- selenium-4.23.0
- selenium-4.22.0
- selenium-4.21.1-ruby
- selenium-4.21.0
- selenium-4.20.1-ruby
- selenium-4.20.0
- selenium-4.19.1-java
- selenium-4.19.0
- selenium-4.18.1
- selenium-4.18.0
- selenium-4.17.2-python
- selenium-4.17.1-python
- selenium-4.17.0
- selenium-4.16.2-dotnet
- selenium-4.16.1-java
- selenium-4.16.1-dotnet
- selenium-4.16.0
- selenium-4.15.2-python
- selenium-4.15.1-python
- selenium-4.15.0
- selenium-4.14.1-java
- selenium-4.14.1-dotnet
- selenium-4.14.0
- selenium-4.13.1-ruby
- selenium-4.13.1-dotnet
- selenium-4.13.0
- selenium-4.12.4-dotnet
- selenium-4.12.3-dotnet
- selenium-4.12.2-dotnet
- selenium-4.12.1-java
- selenium-4.12.1-dotnet
- selenium-4.12.0
- selenium-4.11.2-python
- selenium-4.11.1-python
- selenium-4.11.1-javascript
- selenium-4.11.0
- selenium-4.10.0
- selenium-4.9.2-javascript
- selenium-4.9.1
- selenium-4.9.0
- selenium-4.8.6-ruby
- selenium-4.8.5-ruby
- selenium-4.8.4-ruby
- selenium-4.8.3-ruby
- selenium-4.8.3-python
- selenium-4.8.3-java
- selenium-4.8.2-ruby
- selenium-4.8.2-python
- selenium-4.8.2-javascript
- selenium-4.8.2-java
- selenium-4.8.2-dotnet
- selenium-4.8.1
- selenium-4.8.0
- selenium-4.7.2-python
- selenium-4.7.2-java
- selenium-4.7.1-ruby
- selenium-4.7.1-python
- selenium-4.7.1-java
- selenium-4.7.0
- selenium-4.6.1-ruby
- selenium-4.6.1-python
- selenium-4.6.1-javascript
- selenium-4.6.0
- selenium-4.5.3-java
- selenium-4.5.2-java
- selenium-4.5.1-java
- selenium-4.5.1-dotnet
- selenium-4.5.0
- selenium-4.4.2-python
- selenium-4.4.1-python
- selenium-4.4.0
- selenium-4.3.1-javascript
- selenium-4.3.0
- selenium-4.2.2-java
- selenium-4.2.1-ruby
- selenium-4.2.1-java
- selenium-4.2.0
- selenium-4.1.4-python
- selenium-4.1.4-java
- selenium-4.1.3-python
- selenium-4.1.3-java
- selenium-4.1.2-python
- selenium-4.1.2-javascript
- selenium-4.1.2-java
- selenium-4.1.1-python
- selenium-4.1.1-javascript
- selenium-4.1.1-java
- selenium-4.1.0
- nightly
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Javascript Atoms | ||
|
||
These "atoms" provide reusable building blocks for browser automation | ||
(which is why we call them "atoms"!) They're currently built with the | ||
Google Closure Compiler, but at some point, we'd love to migrate them | ||
to TypeScript since Closure isn't as widely known. | ||
|
||
## Testing the Atoms | ||
|
||
### Iteratively | ||
|
||
While working on the atoms, it can be helpful to be able to iterate on | ||
the code in your IDE of choice, and then run the tests in a | ||
browser. You can do this by starting a debug server: | ||
|
||
```shell | ||
bazel run javascript/atoms:test_debug_server | ||
``` | ||
|
||
And then navigating to: http://localhost:2310/filez/selenium/javascript/atoms/ | ||
|
||
You'll be able to browse around the filesystem until you find the test | ||
you want to work on. | ||
|
||
These files are symlinked by bazel to the ones in the source code, so | ||
edits you make there will be reflected in the code in the browser, | ||
however, new files and removed files may cause you to need to restart | ||
the `bazel run` command. | ||
|
||
### Using Bazel | ||
|
||
You can run all the tests for a browser using: | ||
|
||
```shell | ||
bazel test //javascript/atoms:test{,-chrome,-edge,-safari} | ||
``` | ||
|
||
You can also filter to a specific test using the name of the file | ||
stripped of it's `.html` suffix. For example: | ||
|
||
```shell | ||
bazel test --test_filter=shown_test --//common:headless=false javascript/atoms:test-chrome | ||
``` |