是否有可能在实际浏览器而不是 AWS 实例中的 headless 模式下运行功能性 WebDriver 测试? 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)
最佳答案
您只需指定DISPLAY环境变量,例如:
export DISPLAY=:99
然后使用这个数字运行 xvfb,例如:
xvfb :99
关于java - Amazon Web 服务可以用于 webdriver 功能测试吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33110821/