{"id":356,"date":"2024-06-11T12:38:47","date_gmt":"2024-06-11T12:38:47","guid":{"rendered":"https:\/\/istqblearning.com\/testing\/?page_id=356"},"modified":"2024-06-17T08:41:30","modified_gmt":"2024-06-17T08:41:30","slug":"create-python-project-in-sublime-text","status":"publish","type":"page","link":"https:\/\/istqblearning.com\/testing\/create-python-project-in-sublime-text\/","title":{"rendered":"Create Python project in Sublime Text"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<style>\na:hover {\n  background-color: #ddd;\n  color: black;\n}\n\n.previous {\n  background-color: #f1f1f1;\n  color: black;\n}\n\n.previousnext {\n  text-decoration: none;\n  display: inline-block;\n  padding: 8px 16px;\n  background-color: #f1f1f1;\n  color: black;\n}\n<\/style>\n<\/head>\n<body>\n\n<a href=\"https:\/\/istqblearning.com\/testing\/install-sublime-text\/\" class=\"previousnext\">&laquo; Previous<\/a>\n<a href=\"https:\/\/istqblearning.com\/testing\/create-selenium-python-script-login-form-successfully\/\" class=\"previousnext\">Next &raquo;<\/a>\n\n  \n<\/body>\n<\/html>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"888\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-31-1024x888.png\" alt=\"\" class=\"wp-image-363\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-31-1024x888.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-31-300x260.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-31-768x666.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-31.png 1176w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Type Sublime in Windows search box to open Sublime Text.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"932\" height=\"729\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-32.png\" alt=\"\" class=\"wp-image-364\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-32.png 932w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-32-300x235.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-32-768x601.png 768w\" sizes=\"auto, (max-width: 932px) 100vw, 932px\" \/><\/figure>\n\n\n\n<p>Open New Window by going on File -&gt; New Window.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"622\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-33-1024x622.png\" alt=\"\" class=\"wp-image-365\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-33-1024x622.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-33-300x182.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-33-768x466.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-33.png 1034w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On this new window, add a new folder to the project by going on the menu Project -&gt; Add Folder to Project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"945\" height=\"537\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-34.png\" alt=\"\" class=\"wp-image-366\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-34.png 945w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-34-300x170.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-34-768x436.png 768w\" sizes=\"auto, (max-width: 945px) 100vw, 945px\" \/><\/figure>\n\n\n\n<p>The selected folder will be displayed in the project. Multiple folders can be added to the project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-35-1024x576.png\" alt=\"\" class=\"wp-image-367\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-35-1024x576.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-35-300x169.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-35-768x432.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-35-1536x864.png 1536w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-35.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Select Build System for the project is Python.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a Python source code file<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"653\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-36.png\" alt=\"\" class=\"wp-image-369\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-36.png 929w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-36-300x211.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-36-768x540.png 768w\" sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/figure>\n\n\n\n<p>Right the folder and click New File to create a Python source code file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"670\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-37.png\" alt=\"\" class=\"wp-image-371\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-37.png 1005w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-37-300x200.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-37-768x512.png 768w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/figure>\n\n\n\n<p>Go to File -&gt; Save to save this file in the folder.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-38-1024x576.png\" alt=\"\" class=\"wp-image-372\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-38-1024x576.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-38-300x169.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-38-768x432.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-38-1536x864.png 1536w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-38.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Type &#8220;login-form-successful.py&#8221; in File name textbox and click on Save button.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Run a simple Selenium Python script<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-44-1024x576.png\" alt=\"\" class=\"wp-image-404\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-44-1024x576.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-44-300x169.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-44-768x432.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-44-1536x864.png 1536w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-44.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Create open-istqblearning-website.py file and input the script below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>import time<br>from selenium import webdriver<br><br># Creates a new instance of the chrome driver.<br>driver = webdriver.Chrome()<br><br># Loads a web page in the current browser session<br>driver.get(\"https:\/\/istqblearning.com\")<br><br># Waits for 5 seconds and then close the browser<br>time.sleep(5)<br>driver.close()<br>print(\"Finish running the script\")<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-45-1024x576.png\" alt=\"\" class=\"wp-image-406\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-45-1024x576.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-45-300x169.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-45-768x432.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-45-1536x864.png 1536w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-45.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Make sure Python is checked in Build System.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-46-1024x576.png\" alt=\"\" class=\"wp-image-409\" srcset=\"https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-46-1024x576.png 1024w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-46-300x169.png 300w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-46-768x432.png 768w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-46-1536x864.png 1536w, https:\/\/istqblearning.com\/testing\/wp-content\/uploads\/2024\/06\/titled0101-46.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Select the scritp file, Tools -&gt; Build to run it. The message \u201cFinish running the script\u201d will be printed in the Sublime Text console.<\/p>\n\n\n\n<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<style>\na:hover {\n  background-color: #ddd;\n  color: black;\n}\n\n.previous {\n  background-color: #f1f1f1;\n  color: black;\n}\n\n.previousnext {\n  text-decoration: none;\n  display: inline-block;\n  padding: 8px 16px;\n  background-color: #f1f1f1;\n  color: black;\n}\n<\/style>\n<\/head>\n<body>\n\n<a href=\"https:\/\/istqblearning.com\/testing\/install-sublime-text\/\" class=\"previousnext\">&laquo; Previous<\/a>\n<a href=\"https:\/\/istqblearning.com\/testing\/create-selenium-python-script-login-form-successfully\/\" class=\"previousnext\">Next &raquo;<\/a>\n\n  \n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>&laquo; Previous Next &raquo; Type Sublime in Windows search box to open Sublime Text. Open New Window by going on File -&gt; New Window. On this new window, add a new folder to the project by going on the menu Project -&gt; Add Folder to Project. The selected folder will be displayed in the project. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-356","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/pages\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/comments?post=356"}],"version-history":[{"count":10,"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/pages\/356\/revisions"}],"predecessor-version":[{"id":661,"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/pages\/356\/revisions\/661"}],"wp:attachment":[{"href":"https:\/\/istqblearning.com\/testing\/wp-json\/wp\/v2\/media?parent=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}