【问题标题】:Can Amazon web service can be used for webdriver functional testing?亚马逊网络服务可以用于webdriver功能测试吗?
【发布时间】:2015-10-13 19:15:37
【问题描述】:

是否有可能在实际浏览器中运行功能性 webdriver 测试,而不是在 aws 实例中的无头模式? xvbf 和 Firefox 已经安装完毕。

我尝试运行但出现以下错误:

process:5133): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Error: no display specified
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:120)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:275)

【问题讨论】:

标签: java selenium selenium-webdriver amazon-ec2


【解决方案1】:

你只需要指定DISPLAY环境变量,例如:

导出 DISPLAY=:99

然后使用这个数字运行 xvfb,比如:

xvfb :99

【讨论】:

  • 非常感谢,如果这是缺少的难题,我会先尝试显示变量。该数字必须是:99 次,或者它可以是任何随机数?
  • 因为我记得从 0 到 99 的任何数字,您需要在运行 xvfb 时指定它,例如“xvfb :99”。更新了我的答案。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-29
  • 2017-11-29
  • 2012-11-08
相关资源
最近更新 更多