docker run -d -P --name selenium-hub selenium/hub
docker run -d --link selenium-hub:hub selenium/node-chrome
docker exec -it ad6211909835 bash
You can run a quick test using Python:
pip install selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://138.197.5.202:32768/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.quit()
Here's the url to download Chrome as an RPM: http://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-55.0.2883.87-1.x86_64.rpm