1
resposta

Erro usando chromedriver

Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 30728
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
log4j:WARN Please initialize the log4j system properly.
mai 11, 2019 8:46:24 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: The web application [] appears to have started a thread named [UrlChecker-2] but has failed to stop it. This is very likely to create a memory leak.
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 46.341 sec <<< FAILURE! - in br.com.caelum.argentum.bean.FiltraNegociacoesIT
verificaResultadosFiltradosNaTabela(br.com.caelum.argentum.bean.FiltraNegociacoesIT)  Time elapsed: 25.923 sec  <<< ERROR!
org.openqa.selenium.WebDriverException: 
unknown error: Chrome failed to start: exited abnormally
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.15.0-47-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 19.01 seconds
Build info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
System info: host: 'cadardo', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-47-generic', java.version: '1.8.0_211'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at br.com.caelum.argentum.bean.FiltraNegociacoesIT.iniciaChrome(FiltraNegociacoesIT.java:131)
    at br.com.caelum.argentum.bean.FiltraNegociacoesIT.iniciaNavegador(FiltraNegociacoesIT.java:67)

mai 11, 2019 8:46:24 AM org.apache.coyote.AbstractProtocol pause
INFORMAÇÕES: Pausing ProtocolHandler ["http-bio-8888"]
mai 11, 2019 8:46:24 AM org.apache.catalina.core.StandardService stopInternal
INFORMAÇÕES: Stopping service arquillian-tomcat-embedded-7
mai 11, 2019 8:46:24 AM org.apache.coyote.AbstractProtocol stop
INFORMAÇÕES: Stopping ProtocolHandler ["http-bio-8888"]

Results :

Tests in error: 
  FiltraNegociacoesIT.iniciaNavegador:67->iniciaChrome:131 » WebDriver unknown e...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
1 resposta

Olá Carlos Eduardo, tudo bem? Peço desculpas pela demora em ti responder! Bem o seu problema é semelhante ao problema que o Bruno relatou nesse tópico aqui, você poderia falar se seguir os passos:

1 - Baixar o chromedriver_<sistema-versão>.zip;

2 - Descompactar o arquivo chromedriver_<sistema-versão>.zip em alguma pasta do seu computador;

3 - Indicar o caminho absoluto para o arquivo "chromedriver":

clean verify -Ptestes-integracao -Dwebdriver.chrome.driver=/home/<seu-nome-de-usuario>/alura/integracao-continua-jenkins/chromedriver

Fala pra gente se realizou esse processo? O problema deve ser apenas isso, ou o arquivo que não foi descompactado ou o caminho do arquivo que não está correto!