Skip to content

Instantly share code, notes, and snippets.

Sydney-o9 Sydney-o9

Block or report user

Report or block Sydney-o9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Start Selenium server
# stop Selenium server
# Status for Selenium server
status_selenium -v
# @Author Jobinhood
BV_GREEN_TICK='\e[0;32m [✔] \e[0m';
BV_RED_CROSS='\e[0;91m [✗] \e[0m';
BV_YELLOW_DOT='\e[0;33m [.] \e[0m';
BV_YELLOW_DOTS='\e[0;33m ... \e[0m';
# Helper to run sudo commands for us by asking
# sudo password if needed
sudo_needed() {
# Start Selenium
sudo launchctl load /Library/LaunchDaemons/org.seleniumhq.selenium.plist
# Stop Selenium
sudo launchctl unload /Library/LaunchDaemons/org.seleniumhq.selenium.plist
# Is it working?
ps -ef | grep selenium | grep java | grep chromedriver | grep -v grep | grep -c selenium
# Will show 0 if selenium is not running, and 1 otherwise
View install-selenium-9.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
# Create plist file in /Library/LaunchDaemons
vi /Library/LaunchDaemons/org.seleniumhq.selenium.plist
# Start Selenium
java -jar /usr/local/selenium/bin/selenium-server-standalone-3.8.1.jar
# Make sure it works
ps -ef | grep selenium | grep -v grep
# Change group ownership to _selenium
sudo chown -R _selenium:_selenium /usr/local/selenium
View install-selenium-6.txt
$ sudo dscl
Entering interactive mode… (type “help” for commands)
 > cd /Local/Default
 > ls Groups gid
_selenium 703
_sshd 75
_www 70
# Create group _selenium with gid 703
sudo dscl . -create /Groups/_selenium
sudo dscl . -create /Groups/_selenium PrimaryGroupID 703
# Make sure it now exists
dscacheutil -q group | grep gid | awk ‘{print $2}’ | sort -n | tail -n 1
# Create the deamon user _selenium
sudo dscl . -create /Users/_selenium UniqueID 703
sudo dscl . -create /Users/_selenium PrimaryGroupID 703
# Make sure user _selenium does not already exist
sudo dscl . -read /Users/_selenium
You can’t perform that action at this time.