Selenium Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[Selenium#Subjects|Selenium]]
* [[Selenium#Subjects|Selenium]]
* [[Chrome]]


=Connecting to Debug VNC Server=
=Connecting to Debug VNC Server=
Line 42: Line 43:


=Upgrading Chrome and Chrome Driver in Container=
=Upgrading Chrome and Chrome Driver in Container=
=Selenium Local Component Startup=
For instructions to install Selenium standalone serverJAR, see: {{Internal|Selenium_Installation#Selenium_Standalone_Server_Installation|Selenium Standalone Server Installation}}
==Selenium Local Server Startup==
To start a standalone server:
{{External|https://github.com/ovidiuf/playground/blob/master/selenium/selenium-standalone-server}}

Latest revision as of 06:22, 2 June 2021

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 (Applications/VNC Viewer), using "localhost:5900" and "secret" as password.

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

Upgrading Chrome and Chrome Driver in Container

Selenium Local Component Startup

For instructions to install Selenium standalone serverJAR, see:

Selenium Standalone Server Installation

Selenium Local Server Startup

To start a standalone server:

https://github.com/ovidiuf/playground/blob/master/selenium/selenium-standalone-server