我正在使用带有webdriver的量角器2.1.0。我有一个我想要调试的测试,所以我输入了一个browser.pause()命令。
it 'allows deleting level versions', ->
browser.get('/api#/costings')
element(By.id("edit")).click()
element(By.id("versions")).click()
count=element.all(By.id("listing")).count()
first=element.all(By.id("listing")).first()
browser.pause()
expect(element.all(By.id("listing")).count()).toEqual(parseInt(count) - 1)
这打开了我的测试,打开了WebDriver调试器。一旦我键入一个字符,它就会关闭Selenium。我试图输入' repl'进入交互模式。
------- WebDriver Debugger -------
Starting debugger agent.
Debugger listening on port 5858
ready
press c to continue to the next webdriver command
press d to continue to the next debugger statement
type "repl" to enter interactive mode
type "exit" to break out of interactive mode
press ^C to exit
ControlFlow::1
| Frame::797
| | (pending) Task::796<Asynchronous test function: it()>
| | | Task: Asynchronous test function: it()
| | | Frame::805
| | | | (pending) Task::972<waiting for debugger to attach>
| | | | | Task: waiting for debugger to attach
| | | | | at [object Object].<anonymous> (/home/map7/pais/spec/javascripts/protractor_specs/costings/edit_costing_spec.js.coffee:17:15)
| | | | | (active) Frame::1618
| | | | Task::986<Protractor.waitForAngular()>
| | | | | Task: Protractor.waitForAngular()
| | | | | at [object Object].<anonymous> (/home/map7/pais/spec/javascripts/protractor_specs/costings/edit_costing_spec.js.coffee:18:51)
wd-debug> Attempting to shut down selenium nicely
15:00:43.732 INFO - Checking Resource aliases
15:00:43.733 INFO - Command request: shutDownSeleniumServer[, ] on session null
15:00:43.734 INFO - Shutdown command received
15:00:43.735 INFO - initiating shutdown
15:00:43.735 INFO - Got result: OK on session null
Selenium Standalone has exited with code 0
Selene退出后我可以输入repl并输入类似于调试模式的内容,但由于它现在已关闭而无法连接到后端,因此我无法再执行调试命令。
如何阻止Selenium崩溃?
我已尝试更新到最新的
webdriver-manager update
selenium standalone is up to date.
chromedriver is up to date.
更新
点击&#39; d&#39;或者&#39; c&#39;导致硒关闭。
Completed 200 OK in 25.4ms (Views: 20.0ms | ActiveRecord: 3.5ms)
press c to continue to the next webdriver command
press d to continue to the next debugger statement
press ^C to exit
-- WebDriver control flow schedule
|- waiting for debugger to attach
|--- at [object Object].<anonymous> (/home/map7/pais/spec/javascripts/protractor_specs/invoices/create_invoices_spec.js.coffee:17:15)
|- Protractor.waitForAngular()
|--- at [object Object].<anonymous> (/home/map7/pais/spec/javascripts/protractor_specs/invoices/create_invoices_spec.js.coffee:19:20)
|- Protractor.waitForAngular()
|--- at [object Object].<anonymous> (/home/map7/pais/spec/javascripts/protractor_specs/invoices/create_invoices_spec.js.coffee:20:27)
wd-debug> Attempting to shut down selenium nicely
13:36:14.190 INFO - Checking Resource aliases
13:36:14.191 INFO - Command request: shutDownSeleniumServer[, ] on session null
13:36:14.192 INFO - Shutdown command received
13:36:14.193 INFO - initiating shutdown
13:36:14.193 INFO - Got result: OK on session null
Selenium Standalone has exited with code 0