问题
I am trying to setup karate for UI automation on Windows Laptop. I tried to run the sample code on the zip release 0.9.5 this is what I get. failed features:
src.demo.web.google: google.feature:10 - failed to get reply for: [id: 6, method: Page.navigate, params: {url=https://github.com/login}]
the full stack trace is
feature: src/demo/web/google.feature:7
report: target\surefire-reports\src.demo.web.google.json
scenarios: 1 | passed: 0 | failed: 1
| time: 19.1133
---------------------------------------------------------
Karate version: 0.9.5
======================================================
elapsed: 20.17 | threads: 1 | thread time: 19.11
features: 1 | ignored: 0 | efficiency: 0.95
scenarios: 1 | passed: 0 | failed: 1
======================================================
failed features:
src.demo.web.google: google.feature:10 - failed to get reply for: [id: 6, method: Page.navigate, params: {url=https://github.com/login}]
18:43:56.084 [chrome_1595954616565] WARN com.intuit.karate.shell.Command - exit code was non-zero: 1 - [C:\Program Files (x86)\Google\Chrome\Application\chrome.exe, --remote-debugging-port=9222, --no-first-run, --user-data-dir=C:\Users\Paul\Downloads\karate-0.9.5\target\chrome_1595954616565, --disable-popup-blocking]
com.intuit.karate.exception.KarateException: there are test failures !
at ...(.)
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command java -cp karate.jar com.intuit.karate.Main "c:\Users\Downloads\karate-0.9.5\src\demo\web\google.feature:7"" terminated with exit code: 1.
Please how do I over come this. Thanks
回答1:
Nearly impossible to troubleshoot given this level of information. So I suggest you follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
Else here are my guesses:
maybe Chrome is not installed in the "usual" place, read the docs: https://github.com/intuit/karate/tree/master/karate-core#configure-driver
maybe your laptop has some extra security settings, so ports are blocked, try to work with some tech support. try running
cmd.exeas an "Administrator"try switching the browser / driver, again, read the docs: https://github.com/intuit/karate/tree/master/karate-core#configure-driver
don't use PowerShell - use
cmdinstead. see these docs also: https://github.com/intuit/karate/wiki/Karate-Robot-Windows-Install-Guide#install-visual-studio-code
That's all I can offer, the rest is up to you (or other stack overflow users) all the best.
来源:https://stackoverflow.com/questions/63139597/failed-features-failed-to-get-reply-for-id-6-method-page-navigate-params