From 1e53df4615e07a8d5c4ca5ebfdb29de5c5b4820d Mon Sep 17 00:00:00 2001 From: Brandon Wolfe Date: Wed, 25 May 2022 15:06:38 -0500 Subject: [PATCH] sessionBrowserName doc information and example for Edge (#764) --- .../docs/2.8/scalers/selenium-grid-scaler.md | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/content/docs/2.8/scalers/selenium-grid-scaler.md b/content/docs/2.8/scalers/selenium-grid-scaler.md index 238f06df7..e946d0e54 100644 --- a/content/docs/2.8/scalers/selenium-grid-scaler.md +++ b/content/docs/2.8/scalers/selenium-grid-scaler.md @@ -29,6 +29,7 @@ triggers: - `url` - Graphql url of your Selenium Grid. Refer to the Selenium Grid's documentation [here](https://www.selenium.dev/documentation/en/grid/grid_4/graphql_support/) to for more info. - `browserName` - Name of browser that usually gets passed in the browser capability. Refer to the [Selenium Grid's](https://www.selenium.dev/documentation/en/getting_started_with_webdriver/browsers/) and [WebdriverIO's](https://webdriver.io/docs/options/#capabilities) documentation for more info. +- `sessionBrowserName` - Name of the browser when it is an active session, only set if `BrowserName` changes between the queue and the active session. See the Edge example below for further detail. (Optional) - `browserVersion` - Version of browser that usually gets passed in the browser capability. Refer to the [Selenium Grid's](https://www.selenium.dev/documentation/en/getting_started_with_webdriver/browsers/) and [WebdriverIO's](https://webdriver.io/docs/options/#capabilities) documentation for more info. (Optional) - `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional) @@ -57,7 +58,7 @@ spec: The above example will create Chrome browser nodes equal to the requests pending in session queue for Chrome browser. -Similary for Firefox +Similarly for Firefox ```yaml apiVersion: keda.sh/v1alpha1 @@ -78,6 +79,28 @@ spec: browserName: 'firefox' ``` +Similarly for Edge. Note that for Edge you must set the `sessionBrowserName` to `msedge` inorder for scaling to work properly. + +```yaml +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: selenium-grid-edge-scaledobject + namespace: keda + labels: + deploymentName: selenium-edge-node +spec: + maxReplicaCount: 8 + scaleTargetRef: + name: selenium-edge-node + triggers: + - type: selenium-grid + metadata: + url: 'http://selenium-hub:4444/graphql' + browserName: 'MicrosoftEdge' + sessionBrowserName: 'msedge' +``` + If you are supporting multiple versions of browser capability in your Selenium Grid, You should create one scaler for every browser version and pass the `browserVersion` in the metadata. ```yaml @@ -118,4 +141,4 @@ spec: url: 'http://selenium-hub:4444/graphql' browserName: 'chrome' browserVersion: '90.0' -``` \ No newline at end of file +```