在 Mac Chrome 上使用 Selenium [英] Using Selenium on Mac Chrome

查看:24
本文介绍了在 Mac Chrome 上使用 Selenium的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近有了一台 mac 并且能够毫无问题地运行 Mozilla,但是在安装 Chrome 扩展和为 selenium 运行它时遇到了麻烦.有人可以指导我完成在 Mac chrome 上安装扩展和运行 selenium 的过程.

Recently got a mac and was able to run Mozilla without any issues but having trouble installing chrome extensions and running it for selenium. Can someone guide me through the process of installing the extension and running selenium on Mac chrome.

推荐答案

我认为在 mac os 终端上同时运行 mac osx、chrome 和 selenium 的简单方法是这样的:

I think that the easy way for running mac osx, chrome and selenium together is like this on mac os terminal:

# download selenium jar
curl -L0 https://selenium-release.storage.googleapis.com/3.9/selenium-server-standalone-3.9.1.jar -o selenium-server-standalone.jar

# install chromedriver using cask
brew cask install chromedriver

# start chrome driver
brew services start chromedriver                                                                                                                                                                      
#==> Successfully started `chromedriver` (label:homebrew.mxcl.chromedriver)

# start selenium server
java -jar selenium-server-standalone.jar                                                                                                                                                                           
#14:38:20.684 INFO - Selenium build info: version: '3.9.1', revision: '63f7b50'
#14:38:20.685 INFO - Launching a standalone Selenium Server on port 4444

这篇关于在 Mac Chrome 上使用 Selenium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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