Skip to content

Commit c788fd3

Browse files
authored
Improving README for Windows users
Also, changed a few text details and removed a couple of obsolete comments. [skip ci]
1 parent 5561cda commit c788fd3

1 file changed

Lines changed: 43 additions & 56 deletions

File tree

README.md

Lines changed: 43 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,26 @@ before submitting your pull requests.
4444
the version of Bazel specified in `.bazelversion` file and transparently passes through all
4545
command-line arguments to the real Bazel binary.
4646
* The latest version of the [Java 11 OpenJDK](https://openjdk.java.net/)
47-
* `java` and `jar` on the PATH (make sure you use `java` executable from JDK but not JRE).
47+
* `java` and `jar` on the `$PATH` (make sure you use `java` executable from JDK but not JRE).
4848
* To test this, try running the command `javac`. This command won't exist if you only have the JRE
4949
installed. If you're met with a list of command-line options, you're referencing the JDK properly.
50-
* [Python 3.7+](https://www.python.org/downloads/)
51-
* `python` on the PATH
50+
* [Python 3.7+](https://www.python.org/downloads/) and `python` on the `PATH`
51+
* [Ruby 3+](https://www.ruby-lang.org/en/documentation/installation/) and `ruby` on the `PATH`
5252
* [The tox automation project](http://tox.readthedocs.org/) for Python: `pip install tox`
53-
* MacOS users should have the latest version of Xcode installed, including the command-line tools.
54-
The following command should work:
55-
56-
```bash
57-
xcode-select --install
58-
```
59-
60-
* Users of Apple Silicon Macs should add `build
61-
--host_platform=//:rosetta` to their `.bazelrc.local` file. We are working
53+
* macOS users:
54+
* Install the latest version of Xcode including the command-line tools. This command should work `xcode-select --install`
55+
* Apple Silicon Macs should add `build --host_platform=//:rosetta` to their `.bazelrc.local` file. We are working
6256
to make sure this isn't required in the long run.
63-
64-
* Windows users should have the latest version of Visual Studio command line tools and build tools installed
57+
* Windows users:
58+
* Latest version of [Visual Studio](https://www.visualstudio.com/) with command line tools and build tools installed
6559
* `BAZEL_VS` environment variable should point to the location of the build tools,
6660
e.g. `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools`
6761
* `BAZEL_VC` environment variable should point to the location of the command line tools,
6862
e.g. `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC`
6963
* `BAZEL_VC_FULL_VERSION` environment variable should contain the version of the installed command line tools,
7064
e.g. `14.27.29110`
71-
72-
### Optional Requirements
73-
74-
* Ruby 2.0
65+
* A detailed setup guide can be seen on Jim Evan's [post](http://jimevansmusic.blogspot.com/2020/04/setting-up-windows-development.html)
66+
* If the Jim's blog instructions were followed, also make sure `C:\tools\msys65\usr\bin` is on the `PATH`.
7567

7668
### Internet Explorer Driver
7769

@@ -127,6 +119,15 @@ medium is akin to integration tests, and large is akin to end to end tests.
127119

128120
The `test_tag_filters` allow us to pass in browser names and a few different tags that we can
129121
find in the code base.
122+
123+
To build the Grid deployment jar, run this command:
124+
125+
```sh
126+
bazel build grid
127+
```
128+
129+
The log will show where the output jar is located.
130+
130131
</details>
131132

132133
#### JavaScript
@@ -213,16 +214,20 @@ To build the .NET code run:
213214
```sh
214215
bazel build //dotnet/...
215216
```
217+
218+
Also
219+
```sh
220+
bazel build //dotnet/test/common:chrome
221+
```
222+
216223
</details>
217224

218225

219226
### Build Details
220-
* Bazel files are called BUILD.bazel
221-
* [crazyfun](https://github.com/SeleniumHQ/selenium/wiki/Crazy-Fun-Build) build files are called
222-
*build.desc*. This is an older build system, still in use in the project for Ruby bindings mostly.
223227

224-
The order the modules are built is determined by the build system. If you want to build an
225-
individual module (assuming all dependent modules have previously been built), try the following:
228+
Bazel files are called BUILD.bazel, and the order the modules are built is determined
229+
by the build system. If you want to build an individual module (assuming all dependent
230+
modules have previously been built), try the following:
226231

227232
```sh
228233
bazel test javascript/atoms:test
@@ -234,8 +239,12 @@ In this case, `javascript/atoms` is the module directory,
234239
As you see *build targets* scroll past in the log,
235240
you may want to run them individually.
236241

242+
### Build Output
243+
244+
`bazel` makes a top-level group of directories with the `bazel-` prefix on each directory.
245+
237246

238-
## Common Tasks (Bazel)
247+
### Common Tasks (Bazel)
239248

240249
To build the bulk of the Selenium binaries from source, run the
241250
following command from the root folder:
@@ -244,12 +253,6 @@ following command from the root folder:
244253
bazel build java/... javascript/...
245254
```
246255

247-
To build the grid deployment jar, run this command:
248-
249-
```sh
250-
bazel build grid
251-
```
252-
253256
To run tests within a particular area of the project, use the "test" command, followed
254257
by the folder or target. Tests are tagged with "small", "medium", or "large", and can be filtered
255258
with the `--test_size_filters` option:
@@ -267,7 +270,7 @@ To bump the versions of the pinned browsers to their latest stable versions:
267270
bazel run scripts:pinned_browsers > temp.bzl && mv temp.bzl common/repositories.bzl
268271
```
269272

270-
## Editing Code
273+
### Editing Code
271274

272275
Most of the team use either Intellij IDEA or VS.Code for their day-to-day editing. If you're
273276
working in IntelliJ, then we highly recommend installing the [Bazel IJ
@@ -282,9 +285,8 @@ running, and editing code :)
282285
## Tour
283286

284287
The codebase is generally segmented around the languages used to
285-
write the component. Selenium makes extensive use of JavaScript, so
286-
let's start there. Working on the JavaScript is easy. First of all,
287-
start the development server:
288+
write the component. Selenium makes extensive use of JavaScript, so
289+
let's start there. First of all, start the development server:
288290

289291
```sh
290292
bazel run debug-server
@@ -293,23 +295,13 @@ bazel run debug-server
293295
Now, navigate to
294296
[http://localhost:2310/javascript](http://localhost:2310/javascript).
295297
You'll find the contents of the `javascript/` directory being shown.
296-
We use the [Closure
297-
Library](https://developers.google.com/closure/library/) for
298-
developing much of the JavaScript, so now navigate to
298+
We use the [Closure Library](https://developers.google.com/closure/library/)
299+
for developing much of the JavaScript, so now navigate to
299300
[http://localhost:2310/javascript/atoms/test](http://localhost:2310/javascript/atoms/test).
300301

301302
The tests in this directory are normal HTML files with names ending
302303
with `_test.html`. Click on one to load the page and run the test.
303304

304-
## Maven POM files
305-
306-
Here is the [public Selenium Maven
307-
repository](https://repo1.maven.org/maven2/org/seleniumhq/selenium/).
308-
309-
## Build Output
310-
311-
`bazel` makes a top-level group of directories with the `bazel-` prefix on each directory.
312-
313305
## Help with `go`
314306

315307
More general, but basic, help for `go`
@@ -318,21 +310,21 @@ More general, but basic, help for `go`…
318310
./go --help
319311
```
320312

321-
`go` is just a wrapper around
313+
`go` is a wrapper around
322314
[Rake](http://rake.rubyforge.org/), so you can use the standard
323315
commands such as `rake -T` to get more information about available
324316
targets.
325317

326318
## Maven _per se_
327319

328-
If it is not clear already, Selenium is not built with Maven. It is
329-
built with `bazel`, though that is invoked with `go` as outlined above,
320+
Selenium is not built with Maven. It is built with `bazel`,
321+
though that is invoked with `go` as outlined above,
330322
so you do not have to learn too much about that.
331323

332324
That said, it is possible to relatively quickly build Selenium pieces
333325
for Maven to use. You are only really going to want to do this when
334326
you are testing the cutting-edge of Selenium development (which we
335-
welcome) against your application. Here is the quickest way to build
327+
welcome) against your application. Here is the quickest way to build
336328
and deploy into your local maven repository (`~/.m2/repository`), while
337329
skipping Selenium's own tests.
338330

@@ -342,12 +334,7 @@ skipping Selenium's own tests.
342334

343335
The maven jars should now be in your local `~/.m2/repository`.
344336

345-
## Useful Resources
346-
347-
Refer to the [Build Instructions](https://github.com/SeleniumHQ/selenium/wiki/Build-Instructions)
348-
wiki page for the last word on building the bits and pieces of Selenium.
349-
350-
## Running Browser Tests on Linux
337+
## Running browser tests on Linux
351338

352339
In order to run Browser tests, you first need to install the browser-specific drivers,
353340
such as [`geckodriver`](https://github.com/mozilla/geckodriver/releases),

0 commit comments

Comments
 (0)