![xshell 3 xshell 3](https://pbs.twimg.com/media/Em9RFnxVkAA1laV.png)
Self.start_session(capabilities, browser_profile)įile "/root/.pyenv/versions/3.6.4/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
#XSHELL 3 CODE#
Tar xzvf geckodriver-v0.24.0-linu圆4.tar.gzĬp /usr/local/bin/geckodriver /usr/bin/geckodriverĢ.10 download and configure the webdriver corresponding to google Chrome - chrome driver? Linu圆4Ĭp /usr/local/src/chromedriver_linu圆4/chromedriver selenium]# chromedriver -versionģ.1 write code to test firefox #!/usr/bin/env python3ģ.2 write code to test google chrome #!/usr/bin/env python3įirefox: File "/root/.pyenv/versions/3.6.4/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in _init_įile "/root/.pyenv/versions/3.6.4/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in _init_
![xshell 3 xshell 3](https://www.xiaozhuxitong.com/uploads/190927/1-1Z92G6163H34.png)
user-data-dir="$CHROME_USER_DATA_DIR" -a "$0" "$HERE/chrome" -user-data-dir="/root/.config/google-chrome/" -no-sandboxĢ.9 download and configure the webdriver-geckodriver corresponding to firefox cd /usr/local/src/
![xshell 3 xshell 3](https://blog.netsarang.com/wp-content/uploads/2017/11/Xshell-6-3.png)
Vi /usr/bin/google-chrome Add at the end of the file:
#XSHELL 3 INSTALL#
Mozilla Firefox 66.0.3 src]#firefox No error reported here firefox Normal startup, If there is an error, please visit/etc/hosts The following line is guaranteed:Ģ.8 install google Chrome, and solve that root cannot run chrome yum install selenium]# google-chrome -version rw-r-r- 1 root root 62089056 Apr 30 16:47 /usr/local/src/firefox-66.0.3.tar.bz2 src]#tar xjvf firefox-66.0.3.tar.bz2Ģ.6 create virtual display yum install Xvfb libXfont xorg-x11-fonts*Ģ.7 create a new symbolic link, test firefox to start with xshell src]#cd firefox/ src]#ln -s /usr/lib64/firefox/firefox selenium]# firefox -version Mv /usr/lib64/firefox/ /usr/lib64/firefox.bakĢ.5 download and unzip firefox src]# ls -l /usr/local/src/firefox-66.0.3.tar.bz2 View Linux version selenium]# cat /etc/redhat-releaseĢ.1 install selenium through pip, and install PIP first: selenium]#yum -y install epel-release selenium]#yum -y install python-pipĢ.2 if prompted for pip update, execute the following command: selenium]#pip install -upgrade pipĢ.3 pip installation selenium src]# pip install seleniumĢ.4 uninstall Mozilla firefox from Centos mv /etc/firefox/ /etc/firefox.bak