lundi 13 mai 2019

After Chrome update getting " Cannot call non W3C standard command" in cucumber ruby automation tests

We have cucumber ruby automation framwork where we run few tests on chrome headless browser in a docker on Jenkins. A few days ago we started receiving an error "This version of ChromeDriver only supports Chrome version 75" this time we were using ChromeDriver 2.46 and with google-chrome-unstable browser using the following command:

Chrome

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list RUN apt-get update -y RUN apt-get install -y google-chrome-unstable RUN apt-get install unzip

Set up Chromedriver Environment variables

ENV CHROMEDRIVER_VERSION 2.46 ENV CHROMEDRIVER_VERSION 75.0.3770.8 ENV CHROMEDRIVER_DIR /chromedriver RUN mkdir $CHROMEDRIVER_DIR

Download and install Chromedriver

RUN wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" RUN unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR ENV PATH $CHROMEDRIVER_DIR:$PATH

I have now updated chromedriver version to 75.0.3770.8 and browser to google-chrome-beta=75.0.3770.27-1

Chrome

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list RUN apt-get update -y RUN apt-get install -y google-chrome-beta=75.0.3770.27-1 RUN apt-get install unzip

Set up Chromedriver Environment variables

ENV CHROMEDRIVER_VERSION 75.0.3770.8 ENV CHROMEDRIVER_DIR /chromedriver RUN mkdir $CHROMEDRIVER_DIR RUN echo $CHROMEDRIVER_DIR

Download and install Chromedriver

RUN wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" RUN unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR ENV PATH $CHROMEDRIVER_DIR:$PATH

And now I can see "unknown command: Cannot call non W3C standard command while in W3C mode (Selenium::WebDriver::Error::UnknownCommandError)" error.

Is it possible to disable W3C mode or download an older version of chrome browser and driver that doesn't use it? I think the possibility to disable W3C check would be great.

Could someone please let me know how to fix this? I have spent quite a lot of time investigating this, I will really appreciate a quick reply.

Aucun commentaire:

Enregistrer un commentaire