🐛 Jest Encountered Unexcepted Token While Running selenium side Runner
I am running selenium side runner on ubuntu focal image, with node v10-v19 installed, I keep getting above mentioned error, the selenium-side-runner installed is @4.0.0-alpha.37. On my local MacOS machine having node19 installed with the same version of Side runner, the test are passing
To Reproduce
Docker file
FROM ubuntu:focal
USER root
RUN apt update && apt install curl -y
# Install nodejs 10 which includes npm
RUN curl -sL https://deb.nodesource.com/setup_19.x | bash -
RUN apt install nodejs -y
RUN apt install npm -y
RUN node --version
RUN npm install -g selenium-side-runner@4.0.0-alpha.37
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apt install python3 -y && ln -sf python3 /usr/bin/python
RUN apt install python3-pip -y
RUN pip3 install --no-cache --upgrade pip setuptools
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY google-chrome-stable_current_amd64.deb google-chrome-stable_current_amd64.deb
ENV DEBIAN_FRONTEND=noninteractive
# Chrome dependency Instalation
RUN apt install wget -y
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y -f ./google-chrome-stable_current_amd64.deb
# RUN dpkg -i google-chrome-stable_current_amd64.deb
#RUN apt -f install -y
RUN wget https://chromedriver.storage.googleapis.com/100.0.4896.20/chromedriver_linux64.zip
RUN apt install unzip -y
RUN unzip chromedriver_linux64.zip
RUN chmod +x chromedriver
RUN mv chromedriver /usr/bin/chromedriver
RUN groupadd seluser --gid 1201 \
&& useradd seluser --create-home --gid 1201 --shell /bin/bash --uid 1200 \
&& usermod -a -G sudo seluser \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers && echo 'seluser:secret' | chpasswd
RUN mkdir /sides && chown -R seluser /sides
RUN mkdir /selenium-side-runner && chown -R seluser /selenium-side-runner
WORKDIR /selenium-side-runner
COPY browser.py browser.py
COPY test.side test.side
RUN chmod +x browser.py
USER seluser
ENTRYPOINT ["python3", "browser.py" ]
Python script
import subprocess
import json
import glob
import os
import boto3
import requests
command = 'selenium-side-runner -c "goog:chromeOptions.args=[--headless,--nogpu] browserName=chrome" --output-directory . *.side'
subprocess.run(command, shell=True, check=False)
json_pattern= os.path.join(".","*.json")
file=glob.glob(json_pattern)[0]
with open(file, "r") as file:
data = json.load(file)
testResults = data['testResults']
status = data['success']
statusCode = 0 if status==False else 1
#print(postRequest)
print("Passed", testResults)
print("Failed", status)
#exit(0)
Expected behavior
info: Finished test stackoverflow Success
PASS ../../../../opt/homebrew/lib/node_modules/selenium-side-runner/dist/main.test.js (48.723 s)
Running project stackoverflow
✓ Running test stackoverflow (48358 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 48.759 s, estimated 58 s
Ran all test suites within paths "/opt/homebrew/lib/node_modules/selenium-side-runner/dist/main.test.js".
Project file reproducing this issue (highly encouraged)
Please provide a project file .side that reproduces this issue.
@ogomaemmanuel - I am sorry I've taken so long to come back around here. In all honesty, issues like this I try to pretend they don't exist and hope they go away haha. Any luck on that front?
🐛 Jest Encountered Unexcepted Token While Running selenium side Runner
I am running selenium side runner on ubuntu focal image, with node v10-v19 installed, I keep getting above mentioned error, the selenium-side-runner installed is @4.0.0-alpha.37. On my local MacOS machine having node19 installed with the same version of Side runner, the test are passing
To Reproduce
Docker file
Python script
Expected behavior
Project file reproducing this issue (highly encouraged)
Please provide a project file
.side
that reproduces this issue.Issues without a reproduction project are likely to stall.
Environment
OS: Selenium IDE Version: Selenium SIDE Runner Version: Node version: Browser: Browser Version: