<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abdirihaman Abdulkadir on Medium]]></title>
        <description><![CDATA[Stories by Abdirihaman Abdulkadir on Medium]]></description>
        <link>https://medium.com/@aabdirihaman?source=rss-1d6fd47c3581------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XNJAGbZF1u7N-oxPS8UuHQ@2x.jpeg</url>
            <title>Stories by Abdirihaman Abdulkadir on Medium</title>
            <link>https://medium.com/@aabdirihaman?source=rss-1d6fd47c3581------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 19:43:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aabdirihaman/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automation Tutorial: Simple Facebook login using Selenium & Python.]]></title>
            <link>https://medium.com/@aabdirihaman/automation-tutorial-simple-facebook-login-using-selenium-python-b79ec6a25a91?source=rss-1d6fd47c3581------2</link>
            <guid isPermaLink="false">https://medium.com/p/b79ec6a25a91</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Abdirihaman Abdulkadir]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 19:39:03 GMT</pubDate>
            <atom:updated>2019-06-07T04:09:11.912Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automation Tutorial: Simple Facebook login using Selenium &amp; Python.😎 🚀🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*biBTnJFXX0Rf-N6mybndxw.gif" /><figcaption>Credit: <a href="https://www.twilio.com/blog/author/mspeir">MEGAN SPEIR</a></figcaption></figure><p>Logging into a website is one of the most tedious and boring tasks that everyone has to do, or at-least according to my experience. Wouldn’t it be cool if we could automate that task. 😎</p><p>For this tutorial we will be doing exactly that, using a very simple programming language: <a href="https://www.techbeamers.com/python-tutorial-step-by-step/"><strong>Python</strong></a><strong> </strong>and an open source tool which is used for automating tasks carried out on web browsers: <a href="https://www.seleniumhq.org/"><strong>Selenium</strong></a><strong>.</strong></p><h3>LETS BEGIN 💪🏾</h3><p>⚠️ Some steps might not pertain to Windows and or Linux users. These instructions/steps are best suited for Mac OS X ⚠️</p><ol><li>Check to see if python is installed on your computer. By default python is pre-installed on Mac.</li></ol><p><strong>To verify:</strong></p><ul><li>Press <strong><em>Command</em></strong> and <strong><em>Space </em></strong>on your keyboard<strong><em> </em></strong><em>a</em>nd type <strong>Terminal</strong></li><li><strong><em>Double click</em></strong><em> </em>or press<strong> <em>enter</em> </strong>on your keyboard to open the application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9CUhyqgV26FAtA6xY6luw.png" /><figcaption>Opening up an applications using spotlight search</figcaption></figure><ul><li>On the <strong>Terminal</strong> type: <strong><em>python --version </em></strong><em>and press enter</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JF65MTKLChP-Z0wp6poVYw.png" /></figure><ul><li>🚨If you get anything like <strong><em>Python 2.7.15 or higher such as Python *.*.**</em></strong> <em>you are ready to roll :)</em>🚨</li></ul><h4>If you’ve followed step one and found out you didn’t have python installed 😭. <a href="https://www.python.org/downloads/">Download It Here</a>!!!. Then verify by repeating step 1.</h4><p>2. Install <strong>selenium </strong>for python using <strong>pip</strong>. Type:<strong> <em>pip install selenium</em></strong><em> and press enter</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*ab9ihUQGmzY9fN4qNWmt-w.png" /><figcaption>Installing selenium package for python using pip.</figcaption></figure><ul><li>Don’t have <strong>pip</strong> installed on your computer.<strong> </strong><a href="https://stackoverflow.com/questions/17271319/how-do-i-install-pip-on-macos-or-os-x"><strong>Click Here</strong></a><strong>. Then retry step 2</strong></li></ul><p>⚠️ If you run into this 👇🏾 when installing <strong>Selenium</strong> using<strong> pip </strong>⚠️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvMFqxGlJFVEYdN8Ib7pfQ.png" /><figcaption>installing selenium package using pip failed due to upgrade</figcaption></figure><p>Type : <strong>pip install --<em>version upgrade pip </em></strong><em>and press enter. </em><strong>Then retry step 2</strong></p><p>3. Install Chromedriver</p><p><em>Chromedriver: Is an open source tool for automating webapps. Basically it provides capabilities to do things on the web automatically 😅 on the chrome web browser.</em></p><p><a href="https://chromedriver.storage.googleapis.com/index.html?path=2.45/"><strong>Download it here.</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HRytG95LWSXOZQMgzKcRqQ.png" /><figcaption>The chromedriver zip to download for mac</figcaption></figure><p>4. Copy this code to any text editor and save as <strong>seleniumTutorial.py</strong></p><pre>from selenium import webdriver<br>from selenium.webdriver.common.keys import Keys</pre><pre>#in the string/Quotation marks enter the path to where you downloaded the chromedriver.<br>browser = webdriver.Chrome(&quot;/path to/chromedriver&quot;)</pre><pre>#navigates you to the facebook page.<br>browser.get(&#39;<a href="https://www.facebook.com/&#39;">https://www.facebook.com/&#39;</a>)</pre><pre>#find the username field and enter the email <a href="/service/mailto:example@yahoo.com">example@yahoo.com</a>.<br>username = browser.find_elements_by_css_selector(&quot;input[name=email]&quot;)<br>username[0].send_keys(&#39;<a href="/service/mailto:example@yahoo.com">example@yahoo.com</a>&#39;)</pre><pre>#find the password field and enter the password password.<br>password = browser.find_elements_by_css_selector(&quot;input[name=pass]&quot;)<br>password[0].send_keys(&#39;password&#39;)</pre><pre>#find the login button and click it.<br>loginButton = browser.find_elements_by_css_selector(&quot;input[type=submit]&quot;)<br>loginButton[0].click()</pre><p>5. On the terminal type:<strong> python seleniumTutorial.py </strong>and press <strong>Enter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*do6DXFPy2-GHIX8cncfujw.png" /><figcaption>running the facebook automation python script.</figcaption></figure><h3>Let the automation magic happen 🎆 🎉</h3><p><strong>Thanks for reading.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b79ec6a25a91" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>