dez 06, 2017 4:01:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: executable: C:\GIT\offering-web\offeringweb\src\main\resources\phantomjsdriver\phantomjs.exe
dez 06, 2017 4:01:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: port: 40777
dez 06, 2017 4:01:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: arguments: [--webdriver=40777, --webdriver-logfile=C:\GIT\offering-web\offeringweb\phantomjsdriver.log]
dez 06, 2017 4:01:52 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: environment: {}
[INFO - 2017-12-06T18:01:57.139Z] GhostDriver - Main - running on port 40777
[INFO - 2017-12-06T18:01:57.572Z] Session [8cdf35e0-daaf-11e7-a62a-8f8deefb5de8] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","webSecurityEnabled":true}
[INFO - 2017-12-06T18:01:57.572Z] Session [8cdf35e0-daaf-11e7-a62a-8f8deefb5de8] - page.customHeaders: - {}
[INFO - 2017-12-06T18:01:57.572Z] Session [8cdf35e0-daaf-11e7-a62a-8f8deefb5de8] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.1.1","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"windows-10-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
[INFO - 2017-12-06T18:01:57.573Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 8cdf35e0-daaf-11e7-a62a-8f8deefb5de8
dez 06, 2017 4:01:57 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFORMAÇÕES: Detected dialect: OSS
[INFO - 2017-12-06T18:02:04.917Z] Session [8cdf35e0-daaf-11e7-a62a-8f8deefb5de8] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","webSecurityEnabled":true}
[INFO - 2017-12-06T18:02:04.917Z] Session [8cdf35e0-daaf-11e7-a62a-8f8deefb5de8] - page.customHeaders: - {}
[ERROR - 2017-12-06T18:02:15.474Z] RouterReqHand - _handle.error - {"name":"Invalid Command Method","message":"{\"headers\":{\"Accept-Encoding\":\"gzip,deflate\",\"Cache-Control\":\"no-cache\",\"Connection\":\"Keep-Alive\",\"Host\":\"localhost:40777\",\"User-Agent\":\"Apache-HttpClient/4.5.3 (Java/1.8.0_131)\"},\"httpVersion\":\"1.1\",\"method\":\"GET\",\"url\":\"/alert_text\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"alert_text\",\"directory\":\"/\",\"path\":\"/alert_text\",\"relative\":\"/alert_text\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/alert_text\",\"queryKey\":{},\"chunks\":[\"alert_text\"]},\"urlOriginal\":\"/session/8cdf35e0-daaf-11e7-a62a-8f8deefb5de8/alert_text\"}","line":202,"sourceURL":"phantomjs://code/session_request_handler.js","stack":"_handle@phantomjs://code/session_request_handler.js:202:66\n_reroute@phantomjs://code/request_handler.js:61:20\n_handle@phantomjs://code/router_request_handler.js:78:46"}
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-12-06T18:02:15.765Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1512583335705
phantomjs://platform/console++.js:263 in error
[INFO - 2017-12-06T18:02:15.937Z] ShutdownReqHand - _handle - About to shutdown
dez 06, 2017 4:02:19 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: executable: C:\GIT\offering-web\offeringweb\src\main\resources\phantomjsdriver\phantomjs.exe
dez 06, 2017 4:02:19 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: port: 2329
dez 06, 2017 4:02:19 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFORMAÇÕES: arguments: [--webdriver=2329, --webdriver-logfile=C:\GIT\offering-web\offeringweb\phantomjsdriver.log]
dez 06, 2017 4:02:19 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
Vendo o curso de Selenium e de Integração continua, aprendi aqui sobre o uso do PhantomJS para fazer os testes automáticos de aplicação web sem usar interface gráfica. Porém, sempre que ele chega no passo que iria interagir com algum ALERT, ele falha. Como fazer essa interação com testes rodando só no servidor?