install selenium

[vagrant@localhost ~]$ python3
Python 3.5.2 (default, Jul 28 2018, 11:25:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>>

[vagrant@localhost ~]$ pip install selenium
Requirement already satisfied: selenium in ./.pyenv/versions/3.5.2/lib/python3.5/site-packages (3.13.0)
You are using pip version 18.0, however version 19.1.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.

from selenium import webdriver
from selenium.webdriver.chrome.options import options

options = Options()

options.add_argument('--headless')
options.add_argument('--no-sandbox')

driver = webdriver.Chrome(executable_path='/path/to/chromedriver',chrome_options=options)

driver.get('https://yahoo.co.jp')
print(driver.title)

install selenium

$ npm -g install selenium-webdriver
$ npm install selenium-webdriver

https://sites.google.com/a/chromium.org/chromedriver/downloads

sudo yum install -y google-chrome-unstable libOSMesa google-noto-cjk-fonts

var webdrive = require('selenium-webdriver');
var driver;
var By = webdriver.By;

driver = new webdriver.Builder()
.withCapabilities(webdriver.Capabilities.chrome())
.build();

driver.get('https://www.google.co.jp/').then(function(){
	driver.findElement(By.id('hplog')).click()
	.then(function(){
		console.log('clicked logo');
	});
});

[vagrant@localhost test]$ node chromeTest.js

/home/vagrant/local/app/test/node_modules/selenium-webdriver/index.js:25
const _http = require(‘./http’);
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/vagrant/local/app/test/chromeTest.js:1:78)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)