		{"id":28230,"date":"2022-04-11T21:01:23","date_gmt":"2022-04-11T13:01:23","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=28230"},"modified":"2023-04-06T19:19:43","modified_gmt":"2023-04-06T11:19:43","slug":"automate-create-login-bot-python-selenium","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/","title":{"rendered":"Create an Auto-Login Bot with Python and Selenium"},"content":{"rendered":"<p><strong>Automation<\/strong> is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are <strong>repetitive, boring, time-consuming<\/strong>, or otherwise <strong>inefficient<\/strong> without the use of a script.<\/p>\n<p>With <strong>web automation<\/strong>, you can easily <strong>create a bot to perform different tasks<\/strong> on the web, for instance to monitor competing hotel rates across the Internet and determine the best price.<\/p>\n<p>Personally, I have always found <strong>logging into my email<\/strong> fairly repetitive and boring, so for the sake of a simple example to get you guys <strong>started with web automation<\/strong>, let\u2019s implement an <strong>automated Python script<\/strong> to <strong>log in with a single click<\/strong> to a <a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/tag\/gmail\/\" rel=\"noopener\">Gmail account<\/a>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg\" width=\"700\" height=\"591\" alt=\"Gmail Login\"><\/figure>\n<h3>Installation and Setup<\/h3>\n<p>In this tutorial we are going to use the <strong>following tools<\/strong>:<\/p>\n<ol>\n<li><a target=\"_blank\" href=\"https:\/\/www.python.org\/\" rel=\"noopener\">Python<\/a> programming language<\/li>\n<li><a target=\"_blank\" href=\"https:\/\/www.google.com\/chrome\/\" rel=\"noopener\">Google Chrome<\/a> browser<\/li>\n<li><a target=\"_blank\" href=\"https:\/\/www.selenium.dev\/\" rel=\"noopener\">Selenium<\/a> browser automation toolkit<\/li>\n<li><a target=\"_blank\" href=\"https:\/\/sites.google.com\/a\/chromium.org\/chromedriver\/\" rel=\"noopener\">Chrome Driver<\/a> web driver for Chrome<\/li>\n<\/ol>\n<p>For our program, we will be using the <a target=\"_blank\" href=\"https:\/\/www.python.org\/\" rel=\"noopener\">Python<\/a> programming language, specifically <strong>version 2.7.11<\/strong>. It is critical that we install a <strong>fairly new version of Python 2<\/strong> because it comes with <abbr title=\"Pip Install Packages (recursive acronym)\"><strong>PIP<\/strong><\/abbr>, which will allow us to install third-party packages and frameworks that we will need to automate our scripts.<\/p>\n<p>Once installed, <strong>restart your computer<\/strong> for the changes to take effect. Use the command <code>pip install selenium<\/code> to add the <strong><a target=\"_blank\" href=\"https:\/\/www.selenium.dev\/download\/\" rel=\"noopener nofollow\">Selenium<\/a> web automation toolkit<\/strong> to Python. Selenium will allow us to programmatically scroll, copy text, fill forms and click buttons.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/02-install-selenium.jpg\" width=\"650\" height=\"329\" alt=\"Install Selenium\"><\/figure>\n<p>Finally download the <strong><a target=\"_blank\" href=\"https:\/\/sites.google.com\/a\/chromium.org\/chromedriver\/\" rel=\"noopener\">Selenium Chrome Driver<\/a> executable<\/strong>, which will <strong>open Google Chrome<\/strong> as needed to perform our automated tasks. The Chrome Driver is simply a way to open Google Chrome (which should already be installed) to <strong>access standard browser operations programmatically<\/strong>.<\/p>\n<p>Simply download the most recent ZIP file from <a target=\"_blank\" href=\"https:\/\/sites.google.com\/a\/chromium.org\/chromedriver\/downloads\" rel=\"noopener\">here<\/a>, extract the <code>chromedriver.exe<\/code> executable, and place the executable in any directory. Be sure to make note of where your executable is, because <strong>we will need it once we get started<\/strong>.<\/p>\n<h3>Starting the Program<\/h3>\n<p>As aforementioned, we\u2019ll be using the <strong><a target=\"_blank\" href=\"https:\/\/www.selenium.dev\/\" rel=\"noopener\">Selenium<\/a> web automation framework<\/strong> in order to <strong>log in programmatically<\/strong>. The first order of business is to <strong>import every module<\/strong> we\u2019ll be needing from the Selenium Python library which we installed ealier with PIP.<\/p>\n<p>Let\u2019s open <a target=\"_blank\" href=\"https:\/\/docs.python.org\/3\/library\/idle.html\" rel=\"noopener\">IDLE<\/a> or another code editor, <strong>create a new Python file<\/strong> with <code>.py<\/code> extension, and <strong>import the following modules<\/strong>:<\/p>\n<pre>\r\n from selenium import webdriver\r\n from selenium.webdriver.common.by import By\r\n from selenium.webdriver.support.ui import WebDriverWait\r\n from selenium.webdriver.support import expected_conditions as EC\r\n<\/pre>\n<p>Next, we\u2019ll <strong>create two strings<\/strong> that represent our <strong>username and password<\/strong> for the email account. Pay attention to capitalization, especially in your password string.<\/p>\n<pre>\r\n usernameStr = 'putYourUsernameHere'\r\n passwordStr = 'putYourPasswordHere'\r\n<\/pre>\n<p>Now that we have everything set up in order to start the login process, we need to actually instruct a browser window to <strong>open Google Chrome<\/strong>, and <strong>navigate to Gmail\u2019s login page<\/strong>.<\/p>\n<p>If you haven\u2019t done so already, make sure your Python script is <strong>saved in the same location as the <code>chromedriver.exe<\/code> executable<\/strong> we extracted earlier.<\/p>\n<pre>\r\n browser = webdriver.Chrome()\r\n browser.get(('https:\/\/accounts.google.com\/ServiceLogin?'\r\n 'service=mail&continue=https:\/\/mail.google'\r\n '.com\/mail\/#identifier'))\r\n<\/pre>\n<h3>Finding Our Element<\/h3>\n<p>We\u2019ve successfully gotten the browser to open Gmail, but now we need to <strong>find the input fields<\/strong> on the web page, into which we can <strong>enter our username and password<\/strong>.<\/p>\n<p>We can do this easily using the built-in Chrome Developer Tools. We only need to right-click on the input fields, and select the \u201cInspect\u201d menu.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/03-dev-tools.jpg\" width=\"620\" height=\"263\" alt=\"Find Element in Developer Tools\"><\/figure>\n<p>Now it\u2019s just a matter of <strong>using HTML <code>id<\/code> attributes<\/strong> to find the elements programmatically.<\/p>\n<p>In the code below, we\u2019re simply <strong>searching for the username input field by <code>id<\/code><\/strong>, and <strong>filling it<\/strong> with the desired text. Then we\u2019re <strong>searching for the <span class=\"key\">Next<\/span> button<\/strong> which transitions with a quick animation before prompting us for the password.<\/p>\n<p>The <code>send_keys()<\/code> and <code>click()<\/code> commands do exactly as their names suggest \u2014 <code>send_keys()<\/code> <strong>simulates keypresses<\/strong> in the desired element, and <code>click()<\/code> <strong>simulates a mouse click<\/strong>.<\/p>\n<pre>\r\n # fill in username and hit the next button\r\n username = browser.find_element_by_id('Email')\r\n username.send_keys(usernameStr)\r\n nextButton = browser.find_element_by_id('next')\r\n nextButton.click()\r\n<\/pre>\n<p>We can <strong>do the same thing<\/strong> for the password input field, as well as for the <span class=\"key\">Sign\u00a0in<\/span> button. However, these two items appear on the page <strong>only <em>after<\/em> an animated transition<\/strong>.<\/p>\n<p>That said, we need the program to <strong>wait a few seconds<\/strong> before resuming its search for elements. For the most part, this stage of code is no different from the previous one. We simply have to instruct the browser to <strong>wait a maximum of 10 seconds<\/strong> before locating the password entry.<\/p>\n<pre>\r\n # wait for transition then continue to fill items\r\n password = WebDriverWait(browser, 10).until(\r\n EC.presence_of_element_located((By.ID, 'Passwd')))\r\n password.send_keys(passwordStr)\r\n \r\n signInButton = browser.find_element_by_id('signIn')\r\n signInButton.click()\r\n<\/pre>\n<h3>Final Words<\/h3>\n<p>You\u2019ve just finished <strong>creating a bot<\/strong> that visits a web page, enters your username and password, and successfully sign you in, <strong>automating the whole process<\/strong> to a single click. I know this was a simple demonstration, but the possibilities are endless.<\/p>\n<p>On that same note, <strong>be careful<\/strong> of how you use this skill. Some people use bots and automated scripts to enter sweepstakes thousands of times, completely disregarding terms and conditions. Others use them for more malicious intentions.<\/p>\n<p>Just be sure to use automation purposefully and carefully, because it really is a <strong>much needed skill<\/strong> in the programming community!<\/p>\n<ul class=\"download\">\n<li><a target=\"_blank\" href=\"https:\/\/github.com\/hongkiat\/autologinbot\/\" rel=\"noopener\">Download Source<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring, time-consuming, or otherwise inefficient without the use of a script. With web automation, you can easily create a bot to perform different tasks on the web, for instance to monitor competing hotel&hellip;<\/p>\n","protected":false},"author":362,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[978,3729],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Create an Auto-Login Bot with Python and Selenium - Hongkiat<\/title>\n<meta name=\"description\" content=\"Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create an Auto-Login Bot with Python and Selenium\" \/>\n<meta property=\"og:description\" content=\"Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-11T13:01:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-06T11:19:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg\" \/>\n<meta name=\"author\" content=\"Malik Brahimi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Malik Brahimi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/\"},\"author\":{\"name\":\"Malik Brahimi\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/8633bcf3a28fe63f5029bba4dc215c39\"},\"headline\":\"Create an Auto-Login Bot with Python and Selenium\",\"datePublished\":\"2022-04-11T13:01:23+00:00\",\"dateModified\":\"2023-04-06T11:19:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/\"},\"wordCount\":788,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/automate-create-login-bot-python-selenium\\\/01-gmail-login.jpg\",\"keywords\":[\"Productivity Tips\",\"python\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/\",\"name\":\"Create an Auto-Login Bot with Python and Selenium - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/automate-create-login-bot-python-selenium\\\/01-gmail-login.jpg\",\"datePublished\":\"2022-04-11T13:01:23+00:00\",\"dateModified\":\"2023-04-06T11:19:43+00:00\",\"description\":\"Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring,\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/automate-create-login-bot-python-selenium\\\/01-gmail-login.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/automate-create-login-bot-python-selenium\\\/01-gmail-login.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/automate-create-login-bot-python-selenium\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an Auto-Login Bot with Python and Selenium\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/8633bcf3a28fe63f5029bba4dc215c39\",\"name\":\"Malik Brahimi\",\"description\":\"Malik is a developer located in the Greater Boston area, and loves food, soccer, and programming (favorite language Python).\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/malikbrahimi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create an Auto-Login Bot with Python and Selenium - Hongkiat","description":"Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring,","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/","og_locale":"en_US","og_type":"article","og_title":"Create an Auto-Login Bot with Python and Selenium","og_description":"Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring,","og_url":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2022-04-11T13:01:23+00:00","article_modified_time":"2023-04-06T11:19:43+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg","type":"","width":"","height":""}],"author":"Malik Brahimi","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Malik Brahimi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/"},"author":{"name":"Malik Brahimi","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/8633bcf3a28fe63f5029bba4dc215c39"},"headline":"Create an Auto-Login Bot with Python and Selenium","datePublished":"2022-04-11T13:01:23+00:00","dateModified":"2023-04-06T11:19:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/"},"wordCount":788,"commentCount":1,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg","keywords":["Productivity Tips","python"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/","url":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/","name":"Create an Auto-Login Bot with Python and Selenium - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg","datePublished":"2022-04-11T13:01:23+00:00","dateModified":"2023-04-06T11:19:43+00:00","description":"Automation is undoubtedly one of the most coveted skills a programmer can possess. Automation is typically used for tasks that are repetitive, boring,","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/automate-create-login-bot-python-selenium\/01-gmail-login.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/automate-create-login-bot-python-selenium\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create an Auto-Login Bot with Python and Selenium"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/8633bcf3a28fe63f5029bba4dc215c39","name":"Malik Brahimi","description":"Malik is a developer located in the Greater Boston area, and loves food, soccer, and programming (favorite language Python).","url":"https:\/\/www.hongkiat.com\/blog\/author\/malikbrahimi\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-7lk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/28230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=28230"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/28230\/revisions"}],"predecessor-version":[{"id":66000,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/28230\/revisions\/66000"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=28230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=28230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=28230"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=28230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}