Viewing outstanding requests

假如想象 提交于 2019-12-08 19:38:29
alecxe

The usual approach is to start protractor in a debug mode and put browser.debugger() breakpoint before the problem block of code.

See more information at Debugging Protractor Tests.


On the other hand, you can catch the chromedriver service logs that look like:

[2.389][INFO]: COMMAND FindElement {
   "sessionId": "b6707ee92a3261e1dc33a53514490663",
   "using": "css selector",
   "value": "input"
}
[2.389][INFO]: Waiting for pending navigations...
[2.389][INFO]: Done waiting for pending navigations
[2.398][INFO]: Waiting for pending navigations...
[2.398][INFO]: Done waiting for pending navigations
[2.398][INFO]: RESPONSE FindElement {
   "ELEMENT": "0.3367185448296368-1"
}

Might also give you a clue of what is happening.

For this, you need to start chrome with --verbose and --log-path arguments:

{
     browserName: "chrome",
     specs: [
         "*.spec.js"
     ],
     chromeOptions: {
         args: [
             "--verbose",
             "--log-path=/path/to/the/log/file"
         ]
     }
 }

(not tested)

For firefox, you can turn on and view logs by setting webdriver.log.driver and webdriver.log.file firefox profile settings.

See also:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!