与任何模拟浏览器量角器? [英] protractor with any headless browser?

查看:228
本文介绍了与任何模拟浏览器量角器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用的量角器,当我指定的镀铬作为browsertype它的作品。我要寻找一个无头的浏览器样品code,我已经找了phantomJs但我不能运行任何人。是否有工作示例可在另一个无头的浏览器?

I am using protractor and it works when I specify chrome as the browsertype. I am looking for a headless browser sample code, I have looked for phantomJs but I could not run any of them. Is there a working sample available of another headless browser?

推荐答案

没有其他的模拟浏览器那里,除了PhantomJS而后者则是一条死胡同用量角器。

No other headless browser out there besides PhantomJS while the latter is a dead-end with Protractor.

您可以尝试泊坞窗硒或,如果你不喜欢的泊坞窗你可以用自己的 Ubuntu的无头样本。这两种解决方案提供了Chrome浏览器和Firefox的使用的Xvfb 即使没有真正的显示。

You can try docker-selenium or, if you don't like Docker you can do it yourself with ubuntu-headless sample. Both solutions provide Chrome & Firefox by using Xvfb even though there is no real DISPLAY.

更新2 好像是可以运行的Xvfb在OSX:的http:// xquartz.macosforge.org/landing/

UPDATE 2 Seems to be possible to run Xvfb in OSX: http://xquartz.macosforge.org/landing/

更新1 的Mac OSX硒无头解决方案:

UPDATE 1 Mac OSX selenium headless solution:

因此​​,可以测试MAC硒无头。不无头真的,但作为其他用户,因此它不会与当前用户的显示干扰。
要做到这一点需要Kickstart中: http://support.apple.com/en-us/HT201710
开始使用采用Kickstart实用程序

So can test selenium headless on mac. Not headless really but as another user so it doesn't interfere with your current user display. To do this you need kickstart: http://support.apple.com/en-us/HT201710 Begin using the kickstart utility

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent

激活远程桌面共享,允许访问所有用户的权限,然后重新启动ARD代理:

Activate Remote Desktop Sharing, enable access privileges for all users and restart ARD Agent:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all 

苹果远程桌面3.2或更高版本

允许所有用户的访问,并给所有用户完全访问

Apple Remote Desktop 3.2 or later only

Allow access for all users and give all users full access

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all

Kickstart的帮助命令

Kickstart help command

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help

这篇关于与任何模拟浏览器量角器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆