I am following https://github.com/RobCherry/docker-chromedriver/blob/master/Dockerfile as an example and I have the following in my docker file:
RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && \
mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION && \
curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip && \
unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION && \
rm /tmp/chromedriver_linux64.zip && \
chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver && \
ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
apt-get -yqq update && \
apt-get -yqq install google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
ENV DISPLAY :20.0
ENV SCREEN_GEOMETRY "1440x900x24"
ENV CHROMEDRIVER_PORT 4444
ENV CHROMEDRIVER_WHITELISTED_IPS "127.0.0.1"
ENV CHROMEDRIVER_URL_BASE ''
EXPOSE 4444
To create the driver I am doing:
webdriver.Chrome()
But I get:
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.4.27-boot2docker x86_64)
Do I have to do anything else to allow Chrome to start?
Got it working. The key is to add:
options = webdriver.ChromeOptions()
options.add_argument('--disable-extensions')
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--no-sandbox')
return webdriver.Chrome(chrome_options=options)
I got it working just by adding -
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
driver = new ChromeDriver(chromeOptions);
Related
I'm using this shell script in my jenkins file for running my scripts. I implemented rerun and rebot for merging of reports
${Run_Type} = pabot
${REPORT_FOLDER} = output directory
steps {
script {
dir("${NODE_WORKSPACE}") {
try {
sh "rm -rf ../${BATCH_TARGET_DIR_NAME}"
def exitCode;
if(params.Tags == null || params.Tags.isEmpty()){
exitCode = sh script: "${Run_Type} -d ../${REPORT_FOLDER} -v browser:headlesschrome -v webdriver.chrome.driver:chromedriver -i ${TestGroup} . || \
${Run_Type} -d ../${REPORT_FOLDER} --rerunfailed ../${REPORT_FOLDER}/output.xml -o rerun.xml -i ${TestGroup} . || \
rebot -o ../${REPORT_FOLDER}/final.xml -r ../${REPORT_FOLDER}/report.html -l ../${REPORT_FOLDER}/log.html -R ../${REPORT_FOLDER}/output.xml ../${REPORT_FOLDER}/rerun.xml", returnStatus: true
}
else{
exitCode = sh script: "${Run_Type} -d ../${REPORT_FOLDER} -v browser:headlesschrome -v webdriver.chrome.driver:chromedriver -i ${Tags} . || \
${Run_Type} -d ../${REPORT_FOLDER} --rerunfailed ../${REPORT_FOLDER}/output.xml -o rerun.xml -i ${Tags} . || \
rebot -o ../${REPORT_FOLDER}/final.xml -r ../${REPORT_FOLDER}/report.html -l ../${REPORT_FOLDER}/log.html -R ../${REPORT_FOLDER}/output.xml ../${REPORT_FOLDER}/rerun.xml", returnStatus: true
}
if (exitCode != 0) {
TEST_RESULT = "FAILURE"
throw new Exception("exitCode " + exitCode);
}
} catch (Throwable e) {
throw e
}
}
}
}
Here's the deal:
rebot -R (--merge) xml reports is working when test cases are still failed after rerun.
successful_merge_report_because_rerun_still_failed
But when I rerun and the test case/s are passed, rebot --merge/-R don't even run on jenkins
Report displays only the rerun report and I noticed that rebot --merge didn't even run on my jenkins console output
I'm thinking maybe there's a problem with the logic of my shell script since it's working when test cases are still failed after rerun.
here is an isolated one line of my shell script:
sh script: "${Run_Type} -d ../${REPORT_FOLDER} -v browser:headlesschrome -v webdriver.chrome.driver:chromedriver -i ${TestGroup} . || ${Run_Type} -d ../${REPORT_FOLDER} --rerunfailed ../${REPORT_FOLDER}/output.xml -o rerun.xml -i ${TestGroup} . || rebot -o ../${REPORT_FOLDER}/final.xml -r ../${REPORT_FOLDER}/report.html -l ../${REPORT_FOLDER}/log.html -R ../${REPORT_FOLDER}/output.xml ../${REPORT_FOLDER}/rerun.xml", returnStatus: true
I am trying to install apache version:2.4.54,
./configure --prefix= -with-included-apr --with-apr-util= --with-pcre=
Congiration completed successfully.
installation for apr(1.7.0),apr-util(version:1.6.1),pcre (version : 2-10.40) is successful.
facing below issue while make in the path (httpd/server):
/home/httpd/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I. -I/home/httpd/os/unix -I/home/httpd/include -I/home/httpd/srclib/apr/include -I/home/httpd/srclib/apr-util/include -I/home/pcre/include -I/home/httpd/modules/aaa -I/home/httpd/modules/cache -I/home/httpd/modules/core -I/home/httpd/modules/database -I/home/httpd/modules/filters -I/home/httpd/modules/ldap -I/home/httpd/modules/loggers -I/home/httpd/modules/lua -I/home/httpd/modules/proxy -I/home/httpd/modules/http2 -I/home/httpd/modules/session -I/home/httpd/modules/ssl -I/home/httpd/modules/test -I/home/httpd/server -I/home/httpd/modules/md -I/home/httpd/modules/arch/unix -I/home/httpd/modules/dav/main -I/home/httpd/modules/generators -I/home/httpd/modules/mappers -prefer-non-pic -static -c util.c && touch util.lo
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
*** Error code 1
make: Fatal error: Command failed for target `util.lo'
Current working directory /home/httpd/server
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' mpm'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'delete-exports libmain.la export_vars.h httpd.exp'; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'```
Any Solution for the issue.
installation is done in solaris machine.
I'm trying to integrate my e2e test in our CI pipeline.
We are using Jenkins as CI and we build a docker image and all the tests are running from the docker.
When trying to run the e2e tests I receive an error stating: "Connection refused! Is selenium server started?"
After building the image and installing all the npm packages I use this command in the Jenkins file:
run_in_stage('End2End test', {
image.inside("-u root") {
sh '''
npm run build:dev
http-server ./dist -p 3001 -s &
xvfb-run --server-args="-screen 0 1600x1200x24" npm run test:e2e:smoke
'''
}
})
In the docker file I set up Chrome with xvfb.
RUN \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y xvfb google-chrome-stable
This is how I set up the selenium in the nightwatch.conf.js file:
const seleniumServer = require('selenium-server-standalone-jar');
const chromeDriver = require('chromedriver');
selenium: {
start_process: true,
server_path: seleniumServer.path,
host: '127.0.0.1',
port: 4444,
cli_args: {
'webdriver.chrome.driver': chromeDriver.path
}
},
I'm trying to compile httpd-2.4.20 in Solaris 11.3 box. ./configure doesn't give any error. But make gives an error and I don't know how to fix it. No simmilar question found in stackoverflow or google search. My commands are as follows.
root#LDOM01-test:/data/software/httpd-2.4.20# uname -ar
SunOS LDOM01-test 5.11 11.3 sun4v sparc sun4v
root#LDOM01-test:/data/software/httpd-2.4.20# gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root#LDOM01-test:/data/software/httpd-2.4.20# ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
....
....
....
root#LDOM01-test:/data/software/httpd-2.4.20# make
.....
.....
.....
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I. -I/data/software/httpd-2.4.20/os/unix -I/data/software/httpd-2.4.20/include -I/usr/local/apr/include/apr-1 -I/usr/include/pcre -I/data/software/httpd-2.4.20/modules/aaa -I/data/software/httpd-2.4.20/modules/cache -I/data/software/httpd-2.4.20/modules/core -I/data/software/httpd-2.4.20/modules/database -I/data/software/httpd-2.4.20/modules/filters -I/data/software/httpd-2.4.20/modules/ldap -I/data/software/httpd-2.4.20/modules/loggers -I/data/software/httpd-2.4.20/modules/lua -I/data/software/httpd-2.4.20/modules/proxy -I/data/software/httpd-2.4.20/modules/session -I/data/software/httpd-2.4.20/modules/ssl -I/data/software/httpd-2.4.20/modules/test -I/data/software/httpd-2.4.20/server -I/data/software/httpd-2.4.20/modules/arch/unix -I/data/software/httpd-2.4.20/modules/dav/main -I/data/software/httpd-2.4.20/modules/generators -I/data/software/httpd-2.4.20/modules/mappers -prefer-pic -c regexp.c && touch regexp.slo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -o mod_sed.la -rpath /usr/local/apache2/modules -module -avoid-version mod_sed.lo sed0.lo sed1.lo regexp.lo -export-symbols-regex sed_module
/usr/local/apr/build-1/libtool[1086]: eval: syntax error at line 1: `|' unexpected
*** Error code 3
make: Fatal error: Command failed for target `mod_sed.la'
Current working directory /data/software/httpd-2.4.20/modules/filters
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi; \
list=''; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n 'mod_buffer.la mod_ratelimit.la mod_reqtimeout.la mod_ext_filter.la mod_request.la mod_include.la mod_filter.la mod_substitute.la mod_sed.la mod_deflate.la'; then \
echo "Building shared: mod_buffer.la mod_ratelimit.la mod_reqtimeout.la mod_ext_filter.la mod_request.la mod_include.la mod_filter.la mod_substitute.la mod_sed.la mod_deflate.la"; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20/modules/filters
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi; \
list='aaa cache core database debugging filters http loggers metadata proxy session slotmem ssl proxy/balancers arch/unix dav/main generators dav/fs mappers'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20/modules
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi; \
list='srclib os server modules support'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' srclib os server modules support'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
After the ./configure ....
edit the apr libtool srclib/apr/libtool and remove \$global_symbol_pipe | from following line
# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
>>>>>
export_symbols_cmds="\$NM \$libobjs \$convenience | \$SED 's/.* //' | sort | uniq > \$export_symbols"
Then gmake.
(Thanks Andrew Henle)
Solaris 11.3 /usr/bin/nm was the problem. I changed it to gnm using environment variable and it solved all problems.
export NM=/usr/bin/gnm;
Use gmake instead of make.
Many, many projects implicitly require the use of GNU make.
I am trying install apache 2.4.7 in Solaris machine. First I did the configuration using
./configure
Then, When I do make. after some successful statements it throws me following error.
In file included from mod_ssl.c:27:
ssl_private.h:109:2: #error mod_ssl requires OpenSSL 0.9.8a or later
*** Error code 1
make: Fatal error: Command failed for target `mod_ssl.slo'
Current working directory /var/spool/pkg/httpd-2.4.7/modules/ssl
*** Error code 1
The following command caused the error:
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi; \
list=''; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n 'mod_ssl.la'; then \
echo "Building shared: mod_ssl.la"; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /var/spool/pkg/httpd-2.4.7/modules/ssl
*** Error code 1
The following command caused the error:
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi; \
list='aaa cache core database debugging filters http loggers metadata proxy session slotmem ssl proxy/balancers arch/unix dav/main generators dav/fs mappers'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /var/spool/pkg/httpd-2.4.7/modules
*** Error code 1
The following command caused the error:
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi; \
list='srclib os server modules support'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /var/spool/pkg/httpd-2.4.7
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' srclib os server modules support'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
The same above error is coming even after I install latest openssl version.
OpenSSL 1.0.1f 6 Jan 2014
Please help me to resolve this issue.
I solved this by installing the development package for open ssl: "sudo apt-get install libssl-dev"
You're probably unintentionally trying to link against Oracle's outdated OpenSSL in /usr/sfw/lib. You may need to explicitly specify the path to your copy of OpenSSL 1.0.1f in your httpd configure command, e.g., "--with-ssl=/path/to/openssl".