Eri*_*ric 9 centos firefox x11 xvfb
根据这个问题的答案,我正在运行 Xvfb 来进行虚拟显示,因此 Firefox 将在我的 CentOS 服务器上运行。(我不需要看到 firefox 或使用 firefox 执行任何实际的键或屏幕输入/输出——它只需要运行以便 Selenium 可以驱动它。)我试图弄清楚为什么 Xvfb(或 firefox)正在抛出一堆错误。
我使用以下命令启动 Xvfb:
Xvfb :1 -screen 0 1024x768x24 &
Run Code Online (Sandbox Code Playgroud)
在我启动它之后,屏幕上立即回显了几条错误消息(奇怪的是,它们出现在 shell 提示之后):
[root@host /home/lm/cron]# Xvfb :1 -screen 0 1024x768x24 &
[1] 9214
[root@host /home/lm/cron]# expected keysym, got XF86TouchpadOn: line 120 of inet
expected keysym, got XF86TouchpadOff: line 121 of inet
Run Code Online (Sandbox Code Playgroud)
当我运行 Selenium 测试脚本时,Selenium 日志中会出现更多错误:
5 XSELINUXs still allocated at reset
SCREEN: 0 objects of 176 bytes = 0 total bytes 0 private allocs
DEVICE: 4 objects of 48 bytes = 192 total bytes 0 private allocs
CLIENT: 0 objects of 144 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 48 bytes = 0 total bytes 0 private allocs
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 0 objects of 56 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
TOTAL: 5 objects, 208 bytes, 0 allocs
4 DEVICEs still allocated at reset
DEVICE: 4 objects of 48 bytes = 192 total bytes 0 private allocs
CLIENT: 0 objects of 144 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 48 bytes = 0 total bytes 0 private allocs
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 0 objects of 56 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
TOTAL: 5 objects, 208 bytes, 0 allocs
1 PIXMAPs still allocated at reset
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 0 objects of 56 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
DBE_WINDOW: 0 objects of 24 bytes = 0 total bytes 0 private allocs
TOTAL: 1 objects, 16 bytes, 0 allocs
14:33:47.919 INFO - Done: /session/1330284794945
expected keysym, got XF86TouchpadOn: line 120 of inet
expected keysym, got XF86TouchpadOff: line 121 of inet
Run Code Online (Sandbox Code Playgroud)
现在,有趣的是,尽管出现了所有这些混乱,但一切正常:Selenium 正在与 firefox 属性交谈,firefox 正在做它应该做的事情并将其传递回 Selenium 等。我只想知道 (a) 我是否应该担心所有这些消息/错误,以及 (b) 我该如何清理它?(在我看来,其中大部分是关于“allocs”的某种详细的日志信息——我想关闭它——然后那些“预期的keysym”消息是被抛出的异常。)
我不认为它们是错误。
只是 X 服务器很健谈。
您也可以通过使用以下命令启动 Xvfb 将这些消息发送到 /dev/null Xvfb :1 -screen 0 1024x768x24 2>/dev/null &
| 归档时间: |
|
| 查看次数: |
8384 次 |
| 最近记录: |