Mac System Installation Selenium considerations

Source: Internet
Author: User
Tags parent directory

Mac Latest System: OS X EI Captian

Python: The python2.7 that comes with this machine. (originally want to upgrade 3.5, feel too complicated, give up)

Pip:https://pypi.python.org/pypi/pip Download version pip 8.1.2.tar.gz (download, unzip, CD to directory, execute command: sudo python setup.py install)

Selenium:sudo Easy_install Selenium (networked installation, default latest version, so don't worry about not entering the version number)

Pycharm: Version 2016.1 registration code is as follows

43b4a73yyj-eyjsawnlbnnlswqioii0m0i0qtczwvlkiiwibgljzw5zzwvoyw1lijoibgfuihl1iiwiyxnzawduzwvoyw1lijoiiiwiyxnzawduzwvfbwfpbc I6iiisimxpy2vuc2vszxn0cmljdglvbii6ikzvciblzhvjyxrpb25hbcb1c2ugb25sesisimnozwnrq29uy3vycmvudfvzzsi6zmfsc2usinbyb2r1y3rzijp Beyjjb2rlijoisukilcjwywlkvxbubyi6ijiwmtctmditmjuifsx7imnvzguioijbqyisinbhawrvcfrvijoimjaxny0wmi0ynsj9lhsiy29kzsi6ikrqtiis Inbhawrvcfrvijoimjaxny0wmi0ynsj9lhsiy29kzsi6ilbtiiwicgfpzfvwvg8ioiiymde3ltaylti1in0seyjjb2rlijoire0ilcjwywlkvxbubyi6ijiwm Tctmditmjuifsx7imnvzguioijdtcisinbhawrvcfrvijoimjaxny0wmi0ynsj9lhsiy29kzsi6iljtmcisinbhawrvcfrvijoimjaxny0wmi0ynsj9lhsiy2 9kzsi6iljdiiwicgfpzfvwvg8ioiiymde3ltaylti1in0seyjjb2rlijoiuemilcjwywlkvxbubyi6ijiwmtctmditmjuifsx7imnvzguioijstsisinbhawr Vcfrvijoimjaxny0wmi0ynsj9lhsiy29kzsi6ildtiiwicgfpzfvwvg8ioiiymde3ltaylti1in0seyjjb2rlijoireiilcjwywlkvxbubyi6ijiwmtctmdit Mjuifsx7imnvzguioijeqyisinbhawrvcfrvijoimjaxny0wmi0ynsj9xswiagfzaci6ijmzotgyotkvmcisimdyywnlugvyaw9krgf5cyi6mcwiyxv0b1byb 2xvbmdhdGVkIjpmYWxzZSwiaXNBdXRvUHjvbg9uz2f0zwqiomzhbhnlfq==-keaxikrgxpke4br/zts7s7ukp92lbxre57hvwamu1ehvxtcv1b4f/knqirpopn6dgpjig5emvmpmo7ympl +bmwq8ptzacgfulqchd1ngo6ywhkiqy0nr249sauvacl2wgjwao4jeoh1opux8chzsbvrzbmz0/mgyygi7duyaff9jqqfh3p/ bhdtnm8ekl6z5tnnez8zg5bg1xvqftqwk4fhgsewdk7b+ He44hpjbxkql2gmzaodb6g9yxfthhvrkqy5hq7kpxnvh3ikerhkoal5apgsvbzjotde2kdytnglmqxghfx6l0ofqki6hmr48ergmyfldk6wlngwjvyhlww ==-miiepjccaiagawibagibbtanbgkqhkig9w0baqsfadaymrywfaydvqqdda1kzxrqcm9mawxlienbmb4xdte1mtewmja4mje0ofoxdte4mtewmta4mje0of owetepma0ga1ueawwgchjvzdn5miibijanbgkqhkig9w0baqefaaocaq8amiibcgkcaqeaxcqkq+ zdxlr2mmrybpzgbundmn6oaxixzxiwtmekrjmo/5oufqjbllumsmk0qhfmai37wshyxzcfrcidwxjot4zmnbknlyhoddij/78tmvqfl8noed5+ 07b8veaiu7c3e1n+e1doc6wht4i4+iemtspadoaj5wcqvqbri8ket8m9vcbiwx7fd0fhexfg3zrt0xqwmcxgnp3ddjhio0rcdu+ itv7emtnsvq9jbg1usmsfvmowr25mju2jcpfp1+i4zi+fqgr8gyg8oindyneoabsr3lopi7gruysvkb/xvy/ Voklpck2h0f0gjxfjnye8nt1paywoyl7rmiavre/ Ekwidaqabo4gzmigwmakga1udewqcmaawhqydvr0obbyefgepg9ozgcflmgnbky7sghimggtcmegga1udiwrbmd+afkoetkhnqhi2qb1t4lm0ofkll/ Gzorykgjaymrywfaydvqqdda1kzxrqcm9mawxlienbggka0myxg7kdeeewewydvr0lbawwcgyikwybbquhawewcwydvr0pbaqdagwgma0gcsqgsib3dqebcwu aa4icaqc9wzuygqedsuoc5tousrrigmw4/+wuc5etzbfvdl4ht/8vzmw/oulip4ycva0xkybacj2ix+zcdkopfiyxiasih+ hxapv6j79vvouxkrwg2xv6shftplp+0gpdgq3x9r3+kjbmam8w+fodlwqafjrlvpzmgnedu14ygxiz9bvzmiqbwrba+c/f4tlk/ dv07dsnexihqfoibnqdivntgombau2ddup2gwkdl81ua8eicgnexhe82kjf4zwfadhk3bqvvbfdawxcdy4xbjs3l4raplu3yenszr/oeur1+ jfoxnqsmecmxkxgraq9u55gwjcofkrgoxedek/sk1vfojvs+num4eyerufmfazhzoqiuw4iqggc45ohfh0uuyjycufxxdsu9lmcv8qdhkm+ wnprb0l9l5vxscbduhagyd6ss+ga+ady6f/qxzuuceuoh3qunbbculvisz6+girnt1ka9n2qachl+ 2ybfaquqr8h7z2gsx5lcif5kynsqj0gavxtvywh7pyikx4bs354zqluwwa/cg++2+wnwp+htbhvxmrntdvhsm38aknzld+ ptaswgu9gylmhti2envwgybsd2dxmhxk3ipckhkak+ pl0ewygzwg3tj9mz7sowcxlwdfak0lrjnkgfmtggrwjv8gypw5bq23vmiqqdlgknzuoog==

Precautions:

1, using the python pip installation selenium error

chenchengdemacbook-pro:~ nichoc$ sudo pip install-u Selenium

Password:

The directory '/users/nichoc/library/caches/pip/http ' or its parent directory isn't owned by the current user and the CAC He has been disabled. Please check the permissions and owner for that directory. If executing pip with sudo, your may want sudo ' s-h flag.

The directory '/users/nichoc/library/caches/pip ' or its parent directory isn't owned by the current user and caching Whee LS has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, your may want sudo ' s-h flag.

Requirement already up-to-date:selenium In/library/python/2.7/site-packages

chenchengdemacbook-pro:~ nichoc$

Seems to be insufficient authority, find a lot of posts did not solve, give up, later changed the command sudo easy_install Selenium installation success.

2, the machine does not install Firefox, try other browser Webdriver, have failed, and finally download and install Firefox, without configuring path and path directly completed

Recommended a version of Firefox history, selenium to the latest version of Firefox support is not good, it is recommended to download the historical version:

http://ftp.mozilla.org/pub/firefox/releases/(select version number, select Platform Mac, select language ZC-CN)

3, test selenium installation is successful use case (Firefox pop-up open Baidu homepage and then close)

From selenium import Webdriver
Browser = Webdriver. Firefox ()
Browser.get ("http://www.baidu.com")
Browser.quit ()


Mac System Installation Selenium considerations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.