Selenium Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 33: Line 33:
</syntaxhighlight>
</syntaxhighlight>


If the pod executes on a remote Kubernetes node, available via ssh, tunnel:
If the pod executes on a remote Kubernetes node, available via ssh, tunnel to whatever port is the service exposed to (32614 is just an example):


  ssh -N -L 5900:localhost:32614 <''kubernetes-node''>
  ssh -N -L 5900:localhost:32614 <''kubernetes-node''>


Then connect with the VNC client, using "localhost:5900" and "secret" as password.


More details are available here: https://github.com/SeleniumHQ/docker-selenium
More details are available here: https://github.com/SeleniumHQ/docker-selenium

Revision as of 00:00, 18 September 2019

Internal

Connecting to Debug VNC Server

Selenium pods come with an embedded VNC server that allows connection from remote VNC clients.

To check whether the VNC server is running, execute ps, you should see:

x11vnc -usepw -forever -shared -rfbport 5900 -display :99.0 -noxrecord

The 5900 port should be exposed by a service similar to:

apiVersion: v1
kind: Service
metadata:
  name: 'selenium-chrome'
spec:
  type: LoadBalancer
  ports:
    - name: 4444-tcp
      port: 4444
      targetPort: 4444
      protocol: TCP
    - name: 5900-tcp
      port: 5900
      protocol: TCP
      targetPort: 5900
  selector:
    function: 'selenium-chrome'
  externalTrafficPolicy: Cluster

If the pod executes on a remote Kubernetes node, available via ssh, tunnel to whatever port is the service exposed to (32614 is just an example):

ssh -N -L 5900:localhost:32614 <kubernetes-node>

Then connect with the VNC client, using "localhost:5900" and "secret" as password.

More details are available here: https://github.com/SeleniumHQ/docker-selenium