Appium with Selenium 4 grid deploied on kubernetes

351 views
Skip to first unread message

Mário Pereira

unread,
Dec 26, 2022, 7:46:19 AM12/26/22
to Selenium Users
Hello comm!
Merry Christmas!

I have a couple of devices that I used to connect to selenium grid 3 with Appium as middleware.
Recently we updated Selenium 3 to Selenium 4 and deployed the grid on a kubernetes cluster.

From what we could see we need to have a relay node to bridge the webdriver communication but I don't see how can we configure the on K8S helm chart https://artifacthub.io/packages/helm/blackfire/selenium.

Can you please advice us?
Thanks

Vinayak S Kori

unread,
Dec 27, 2022, 8:37:58 AM12/27/22
to seleniu...@googlegroups.com

Hi,

In Selenium 4, the concept of a "relay node" has been replaced with the concept of a "relay server". The relay server acts as a bridge between the client (such as Appium) and the actual webdriver (such as Chrome or Firefox).

To configure a relay server in a Selenium grid deployed on Kubernetes using the Helm chart, you can follow these steps:

  1. First, you need to install the Helm chart for the Selenium grid. You can do this by running the helm install command and specifying the chart repository and chart name.

  2. Next, you need to modify the values.yaml file to include the configuration for the relay server. You can do this by adding the following block to the file:

relay:
  enabled: true
  host: "0.0.0.0"
  port: 4444
  path: /wd/hub

  1. In the above configuration, the host and port values specify the address and port that the relay server will listen on. The path value specifies the URL path that the relay server will use to handle webdriver requests.

  2. Once you have modified the values.yaml file, you can use the helm upgrade command to apply the changes to your Selenium grid deployment.

  3. To connect to the Selenium grid using the relay server, you can use the http://<relay-server-address>:<relay-server-port>/wd/hub URL as the remote webdriver endpoint. For example:

from selenium import webdriver

driver = webdriver.Remote(
    command_executor='http://<relay-server-address>:<relay-server-port>/wd/hub',
    desired_capabilities={'browserName': 'chrome'}
)

I Hope this helps you.

Regards,
Vinayak S Kori
QA Analyst

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/02f16c1f-e3d9-41c4-b975-e58f3e52393dn%40googlegroups.com.

Mário Pereira

unread,
Dec 29, 2022, 9:55:25 AM12/29/22
to Selenium Users
Hey Vinayak S Kori, 

Thanks for reaching out!
I tried it and failed :D I just checked the Helm chart values file here and I didn't find the "relay" values.

Are we using the correct helm chart, do we have another one that has that relay values?

Thanks in advance,
Cheers,
Mário
Reply all
Reply to author
Forward
0 new messages