Update README.md for .NET CDP version modifications
-#Adding support for a new version of Chromium DevTools Protocol to the .NET bindings
+### Adding support for a new version of Chromium DevTools Protocol to the .NET bindings
To add support for a new version of the Chromium DevTools Protocol to the .NET bindings,
perform the following steps, where `<N>` is the major version of the protocol:
@@ -16,25 +16,29 @@ add an entry for version `<N>` to the `SupportedDevToolsVersions` dictionary ini
6. In [`//dotnet/src/webdriver:WebDriver.csproj.prebuild.cmd`](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd),
add the following block (substituting the proper value for `<N>`):
+```
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v<N>\DevToolsSessionDomains.cs" (
echo Generating CDP code for version <N>
pushd "%1..\..\.."
bazel build //dotnet/src/webdriver/cdp:generate-v<N>
popd
)
+```
7. In [`//dotnet/src/webdriver:WebDriver.csproj.prebuild.sh`](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh),
add the following block (substituting the proper value for `<N>`):
+```
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v<N>/DevToolsSessionDomains.cs" ]]
then
echo "Generating CDP code for version <N>"
bazel build //dotnet/src/webdriver/cdp:generate-v<N>
fi
+```
8. Commit the changes.
-#Removing support for a version of Chromium DevTools Protocol from the .NET bindings
+### Removing support for a version of Chromium DevTools Protocol from the .NET bindings
To remove support for a version of the Chromium DevTools Protocol from the .NET bindings,
perform the following steps, where `<N>` is the major version of the protocol:
