【发布时间】:2012-04-21 15:03:48
【问题描述】:
我在使用 Selenium 时遇到了两个问题。
1.- 在 windows 上启动浏览器时出错 --> Example::testMyTestCase
截屏时的问题:
Invalid response while accessing the Selenium Server at
'http://localhost:4444/selenium-server/driver/':
ERROR Server Exception: sessionId should not be null;
has this session been started yet?
Invalid response while accessing the Selenium Server at
'http://localhost:4444/selenium-server/driver/':
Failed to start new browser session: Error while launching browser
2.- 我在 Linux 上使用过 Selenium。使用 PHPunit 运行代码时,打开的浏览器窗口会自动关闭。我需要在执行后查看日志详细信息。这需要什么设置吗?
【问题讨论】:
-
您使用的是哪个 Selenium 版本?你是如何启动 selenium 服务器的?
-
Selenium 版本:selenium-server-1.0.3 我们正在使用带有命令的批处理文件:java -jar selenium-server.jar –browserSessionReuse
-
对于问题 1:- 似乎您在截取屏幕截图之前要关闭 selenium 会话对于问题 2 - 您可以在启动 selenium 时传递 -log 参数以将日志写入文件
标签: php selenium phpunit selenium-rc selenium-webdriver