karate ui - браузер быстро закрывается при загрузке сайта - PullRequest
0 голосов
/ 21 июня 2020

Я пытаюсь настроить тесты автоматизации пользовательского интерфейса на основе карате, используя chrome браузер на windows. Я попробовал простой демонстрационный пример, приведенный в документации. Однако, когда я запускаю скрипт, мой браузер запускается, пытается загрузить URL-адрес githib и сразу же внезапно закрывается. Пожалуйста, посмотрите отчет здесь. Не могли бы вы помочь решить эту проблему?


11:31:37.106 [ForkJoinPool-1-worker-1] INFO  com.intuit.karate - Karate Properties :  [object Object] 
11:31:37.286 [chrome_1592719297279] DEBUG c.i.k.driver.chrome_1592719297279 - command: [C:\Program Files (x86)\Google\Chrome\Application\chrome.exe, --remote-debugging-port=9222, --no-first-run, --user-data-dir=C:\idms\DigitalVehicleHub\tests\KarateDSL\target\chrome_1592719297279, --disable-popup-blocking]
11:31:37.287 [chrome_1592719297279] DEBUG c.i.k.driver.chrome_1592719297279 - env PATH: null
11:31:37.311 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1592719297279 - poll attempt #0 for port to be ready - localhost:9222
11:31:38.505 [chrome_1592719297279] DEBUG c.i.k.driver.chrome_1592719297279 - 
11:31:38.506 [chrome_1592719297279] DEBUG c.i.k.driver.chrome_1592719297279 - DevTools listening on ws://127.0.0.1:9222/devtools/browser/179bfb24-354f-4ef3-b534-2bbaa34f015a
11:31:42.113 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - request:
1 > GET http://localhost:9222/json
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Host: localhost:9222
1 > User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_251)

11:31:42.172 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - response time in milliseconds: 51.44
1 < 200
1 < Content-Length: 2199
1 < Content-Type: application/json; charset=UTF-8
[ {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/96C126BB104388AE94CDEBBA4A3E8780",
   "id": "96C126BB104388AE94CDEBBA4A3E8780",
   "title": "CryptoTokenExtension",
   "type": "background_page",
   "url": "chrome-extension://kmendfapggjehodndflmmgagdbamhnfd/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/96C126BB104388AE94CDEBBA4A3E8780"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/E018EC850F8ADF72B936324E19D1E42F",
   "id": "E018EC850F8ADF72B936324E19D1E42F",
   "title": "Google Network Speech",
   "type": "background_page",
   "url": "chrome-extension://neajdppkdcdipfabeoofebfddakdcjhd/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/E018EC850F8ADF72B936324E19D1E42F"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/AAEFF42DC28CB58E4BCACAD723836147",
   "id": "AAEFF42DC28CB58E4BCACAD723836147",
   "title": "Feedback",
   "type": "background_page",
   "url": "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/AAEFF42DC28CB58E4BCACAD723836147"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/3687514F2463AD58B8839C1F2AAFCF21",
   "id": "3687514F2463AD58B8839C1F2AAFCF21",
   "title": "Google Hangouts",
   "type": "background_page",
   "url": "chrome-extension://nkeimhogjdpnpccoofpliimaahmaaome/background.html",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/3687514F2463AD58B8839C1F2AAFCF21"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/B96258180A3219EE9E5DB82B3D8F825A",
   "id": "B96258180A3219EE9E5DB82B3D8F825A",
   "title": "portal.<>.<>.corp",
   "type": "page",
   "url": "https://portal.wdf.sap.corp/home",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/B96258180A3219EE9E5DB82B3D8F825A"
} ]


11:31:42.213 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - page id: B96258180A3219EE9E5DB82B3D8F825A
11:31:42.277 [chrome_1592719297279] DEBUG c.i.k.driver.chrome_1592719297279 - [618828:621684:0621/113142.277:ERROR:device_event_log_impl.cc(208)] [11:31:42.276] Bluetooth: bluetooth_adapter_winrt.cc:1150 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power.
11:31:44.540 [nioEventLoopGroup-2-1] DEBUG c.i.k.netty.WebSocketClientHandler - websocket client connected
11:31:44.542 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - >> {"method":"Target.activateTarget","params":{"targetId":"B96258180A3219EE9E5DB82B3D8F825A"},"id":1}
11:31:44.577 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"id":1,"result":{}}
11:31:44.579 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - >> {"method":"Page.enable","id":2}
11:31:44.585 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"id":2,"result":{}}
11:31:44.586 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - >> {"method":"Browser.getWindowForTarget","params":{"targetId":"B96258180A3219EE9E5DB82B3D8F825A"},"id":3}
11:31:44.590 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"id":3,"result":{"windowId":1,"bounds":{"left":10,"top":10,"width":1050,"height":660,"windowState":"normal"}}}
11:31:44.593 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - >> {"method":"Page.navigate","params":{"url":"https:\/\/github.com\/login"},"id":4}
11:31:44.777 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"id":4,"result":{"frameId":"B96258180A3219EE9E5DB82B3D8F825A","loaderId":"478D0549DE1679AE469354FB6A55F577"}}
11:31:44.959 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"method":"Page.frameStartedLoading","params":{"frameId":"B96258180A3219EE9E5DB82B3D8F825A"}}
11:31:44.985 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"method":"Page.frameNavigated","params":{"frame":{"id":"B96258180A3219EE9E5DB82B3D8F825A","loaderId":"478D0549DE1679AE469354FB6A55F577","url":"https://github.com/login","securityOrigin":"https://github.com","mimeType":"text/html"}}}
11:31:45.503 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"method":"Page.domContentEventFired","params":{"timestamp":1540806.135729}}
11:31:45.524 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - >> {"method":"Browser.close","id":5}
11:31:45.534 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"id":5,"result":{}}
11:31:45.536 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"method":"Inspector.detached","params":{"reason":"Render process gone."}}
11:31:45.578 [nioEventLoopGroup-2-1] DEBUG com.intuit.karate - << {"method":"Inspector.detached","params":{"reason":"target_closed"}}
11:31:45.584 [ForkJoinPool-1-worker-1] DEBUG c.intuit.karate.shell.CommandThread - closing command: chrome_1592719297279
11:31:45.584 [nioEventLoopGroup-2-1] DEBUG c.i.k.netty.WebSocketClientHandler - websocket client disconnected
11:31:45.766 [pool-1-thread-1] INFO  com.intuit.karate.Runner - <<fail>> feature 1 of 1: classpath:dvh/vehicle/features/demo-01.feature"
---------------------------------------------------------
feature: classpath:dvh/vehicle/features/demo-01.feature
report: target\surefire-reports\dvh.vehicle.features.demo-01.json
scenarios:  1 | passed:  0 | failed:  1 | time: 8.2505
---------------------------------------------------------
Karate version: 0.9.4
======================================================
elapsed:  10.16 | threads:    1 | thread time: 8.25 
features:     1 | ignored:    0 | efficiency: 0.81
scenarios:    1 | passed:     0 | failed: 1
failed features:
dvh.vehicle.features.demo-01: demo-01.feature:16 - javascript evaluation failed: input('#login_field', 'dummy'), ReferenceError: "input" is not defined in <eval> at line number 1

Спасибо,

1 Ответ

0 голосов
/ 21 июня 2020

Вы используете очень старую версию. Используйте 0.9.6.RC3

Если у вас все еще есть проблемы, важно следовать этому процессу: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

...