{"id":1089,"date":"2019-12-07T12:51:45","date_gmt":"2019-12-07T07:21:45","guid":{"rendered":"http:\/\/http:\/\/artoftesting.com\/\/?page_id=1089"},"modified":"2023-12-14T17:56:01","modified_gmt":"2023-12-14T12:26:01","slug":"samplesiteforselenium","status":"publish","type":"page","link":"https:\/\/artoftesting.com\/samplesiteforselenium","title":{"rendered":"Sample Webpage for Automation Practice"},"content":{"rendered":"\n<p>This is a sample web page with dummy elements that will help you in practicing automation. This page has most of the commonly used web elements like &#8211; text-box, links, buttons, check boxes, radio buttons, drop-downs, alert boxes, and drags &amp; drop widgets.&nbsp;<\/p>\n\n\n\n<p>In case you are using Selenium WebDriver with Java for automation then you can refer to our tutorial &#8211;&nbsp;<b><a href=\"http:\/\/artoftesting.com\/selenium-webdriver-commands-list\">Selenium Sample Script<\/a><\/b>. It contains an explanation of the different Selenium commands along with a sample script that automates each of these web elements.<br><br><\/p>\n\n\n\n<div id=\"commonWebElements\">\n\t<div id=\"idOfDiv\">\n\t\t<p><b>This is sample text!<\/b><\/p>\n\t<\/div>\n\n\t<p>Link : <a href=\"http:\/\/www.artoftesting.com\/sampleSiteForSelenium.html\">This is a link<\/a> <br><\/p>\n\t<p>TextBox : <input id=\"fname\" type=\"text\" name=\"firstName\"><br><br>\n\t\t<p>Button : <button id=\"idOfButton\" style=\"background:#287699\" title=\"Hovering over me!!\" type=\"button\" onclick=\"this.style.background='blue';\">Submit<\/button><br><br>\n\t\t\t<button id=\"dblClkBtn\" style=\"background:#287699\" ondblclick=\"generateAlertBox()\">Double-click to generate alert box<\/button><br><br>\n\t\t\t<p>Radio button :<\/p>\n\t\t\t<form action=\"#\">\n\t\t\t\t<input id=\"male\" type=\"radio\" name=\"gender\" value=\"male\">Male<br>\n\t\t\t\t<input id=\"female\" type=\"radio\" name=\"gender\" value=\"female\">Female\n\t\t\t<\/form><br>\n\n\t\t\t<p>Checkbox :<\/p>\n\t\t\t<form action=\"#\">\n\t\t\t\t<input type=\"checkbox\" class=\"Automation\" value=\"Automation\">Automation Testing<br>\n\t\t\t\t<input type=\"checkbox\" class=\"Performance\" value=\"Performance\">Performance Testing\n\t\t\t<\/form><br>\t\n\n\t\t\t<p>Drop down :<\/p>\n\t\t\t<select id=\"testingDropdown\">\n\t\t\t\t<option id=\"automation\" value=\"Automation\">Automation Testing<\/option>\n\t\t\t\t<option id=\"performance\" value=\"Performance\">Performance Testing<\/option>\n\t\t\t\t<option id=\"manual\" value=\"Manual\">Manual Testing<\/option>\n\t\t\t\t<option id=\"database\" value=\"Database\">Database Testing<\/option>\n\t\t\t<\/select>\n\n<\/div><br><br>\n\n<div id=\"AlertBox\">\n    <p>Click below button to generate Alert box.<\/p>\n    <button style=\"background:#287699\" onclick=\"generateAlertBox()\">Generate Alert Box<\/button>\n    <script>\n        function generateAlertBox()\n        {\n            alert(\"Hi! Art Of Testing, Here!\");\n        }\n    <\/script> \n<\/div><br><br>\n\n<div id=\"ConfirmBox\">\n    <p>Click below button to generate Confirm box.<\/p>\n    <button style=\"background:#287699\" onclick=\"generateConfirmBox()\">Generate Confirm Box<\/button>\n    <p id=\"demo\"><\/p>\n    <script>\n        function generateConfirmBox()\n        {\n            var x;\n            var r=confirm(\"Press a button!\");\n            if (r==true)\n            {\n                x=\"You pressed OK!\";\n            }\n            else\n            {\n                x=\"You pressed Cancel!\";\n            }\n            document.getElementById(\"demo\").innerHTML=x;\n        }\n    <\/script>\n<\/div><br><br>\n\n<p>Drag and drop example- drag the below image on the textbox<\/p>\n<div id=\"targetDiv\" ondrop=\"drop(event)\" ondragover=\"allowDrop(event)\" style=\"width:400px;height:120px;padding:10px;border:1px solid #aaaaaa;\"><\/div>\n<br>\n<img decoding=\"async\" src=\"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg\" alt=\"art of testing\" id=\"myImage\"   draggable=\"true\" ondragstart=\"drag(event)\"\/>\n\n<div><br><br>\n<h2>Useful Resources<\/h2>\n<ul>\n<li>Sample Script in Selenium WebDriver with Java &#8211; <a href=\"http:\/\/artoftesting.com\/selenium-webdriver-commands-list\">Selenium Sample Script<\/a><\/li>\n<li>Complete Selenium WebDriver Tutorial &#8211; <a href=\"http:\/\/artoftesting.com\/selenium-tutorial\">Selenium Tutorial<\/a><\/li>\n<li>SQL Queries asked in Interviews &#8211; <a href=\"http:\/\/artoftesting.com\/sql-queries-for-interview\">SQL Query Interview Questions<\/a><\/li>\n<li>Best Test Management Tools For Simplified Testing &#8211; <a href=\"http:\/\/artoftesting.com\/test-management-tools\">Test Management Tools<\/a><\/li>\n<\/ul>\n\n<\/div>\n\n<script>\n\tfunction allowDrop(ev)\n\t{\n\t\tev.preventDefault();\n\t}\n\n\tfunction drag(ev)\n\t{\n\t\tev.dataTransfer.setData(\"text\",ev.target.id);\n\t}\n\n\tfunction drop(ev)\n\t{\n\t\tev.preventDefault();\n\t\tvar data=ev.dataTransfer.getData(\"text\");\n\t\tev.target.appendChild(document.getElementById(data));\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>This is a sample web page with dummy elements that will help you in practicing automation. This page has most of the commonly used web elements like &ndash; text-box, links, buttons, check boxes, radio buttons, drop-downs, alert boxes, and drags &amp; drop widgets.&nbsp; In case you are using Selenium WebDriver with Java for automation then &#8230; <a title=\"Sample Webpage for Automation Practice\" class=\"read-more\" href=\"https:\/\/artoftesting.com\/samplesiteforselenium\" aria-label=\"Read more about Sample Webpage for Automation Practice\">Read more<\/a><\/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-1089","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sample Webpage for Selenium Automation Practice | ArtOfTesting<\/title>\n<meta name=\"description\" content=\"A dummy website with different types of dummy web elements for practicing website automation using tools like Selenium WebDriver.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/artoftesting.com\/samplesiteforselenium\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sample Webpage for Selenium Automation Practice | ArtOfTesting\" \/>\n<meta property=\"og:description\" content=\"A dummy website with different types of dummy web elements for practicing website automation using tools like Selenium WebDriver.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/artoftesting.com\/samplesiteforselenium\" \/>\n<meta property=\"og:site_name\" content=\"ArtOfTesting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/artoftesting\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-14T12:26:01+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@theartoftesting\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/artoftesting.com\/samplesiteforselenium\",\"url\":\"https:\/\/artoftesting.com\/samplesiteforselenium\",\"name\":\"Sample Webpage for Selenium Automation Practice | ArtOfTesting\",\"isPartOf\":{\"@id\":\"https:\/\/artoftesting.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/artoftesting.com\/samplesiteforselenium#primaryimage\"},\"image\":{\"@id\":\"https:\/\/artoftesting.com\/samplesiteforselenium#primaryimage\"},\"thumbnailUrl\":\"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg\",\"datePublished\":\"2019-12-07T07:21:45+00:00\",\"dateModified\":\"2023-12-14T12:26:01+00:00\",\"description\":\"A dummy website with different types of dummy web elements for practicing website automation using tools like Selenium WebDriver.\",\"breadcrumb\":{\"@id\":\"https:\/\/artoftesting.com\/samplesiteforselenium#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/artoftesting.com\/samplesiteforselenium\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/artoftesting.com\/samplesiteforselenium#primaryimage\",\"url\":\"https:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg\",\"contentUrl\":\"https:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg\",\"width\":183,\"height\":57,\"caption\":\"Drag and Drop Demo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/artoftesting.com\/samplesiteforselenium#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/artoftesting.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sample Webpage for Automation Practice\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/artoftesting.com\/#website\",\"url\":\"https:\/\/artoftesting.com\/\",\"name\":\"ArtOfTesting\",\"description\":\"A Beginners Guide to Testing\",\"publisher\":{\"@id\":\"https:\/\/artoftesting.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/artoftesting.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/artoftesting.com\/#organization\",\"name\":\"ArtOfTesting\",\"url\":\"https:\/\/artoftesting.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/artoftesting.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/Artoftesting_logo.png\",\"contentUrl\":\"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/Artoftesting_logo.png\",\"width\":400,\"height\":60,\"caption\":\"ArtOfTesting\"},\"image\":{\"@id\":\"https:\/\/artoftesting.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/artoftesting\",\"https:\/\/x.com\/theartoftesting\",\"https:\/\/www.linkedin.com\/groups\/4797819\/\",\"https:\/\/in.pinterest.com\/artoftesting\/\",\"https:\/\/www.youtube.com\/channel\/UCQ9PUVenvvyrUdDQ9yKn31Q\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sample Webpage for Selenium Automation Practice | ArtOfTesting","description":"A dummy website with different types of dummy web elements for practicing website automation using tools like Selenium WebDriver.","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:\/\/artoftesting.com\/samplesiteforselenium","og_locale":"en_US","og_type":"article","og_title":"Sample Webpage for Selenium Automation Practice | ArtOfTesting","og_description":"A dummy website with different types of dummy web elements for practicing website automation using tools like Selenium WebDriver.","og_url":"https:\/\/artoftesting.com\/samplesiteforselenium","og_site_name":"ArtOfTesting","article_publisher":"https:\/\/facebook.com\/artoftesting","article_modified_time":"2023-12-14T12:26:01+00:00","og_image":[{"url":"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@theartoftesting","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/artoftesting.com\/samplesiteforselenium","url":"https:\/\/artoftesting.com\/samplesiteforselenium","name":"Sample Webpage for Selenium Automation Practice | ArtOfTesting","isPartOf":{"@id":"https:\/\/artoftesting.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/artoftesting.com\/samplesiteforselenium#primaryimage"},"image":{"@id":"https:\/\/artoftesting.com\/samplesiteforselenium#primaryimage"},"thumbnailUrl":"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg","datePublished":"2019-12-07T07:21:45+00:00","dateModified":"2023-12-14T12:26:01+00:00","description":"A dummy website with different types of dummy web elements for practicing website automation using tools like Selenium WebDriver.","breadcrumb":{"@id":"https:\/\/artoftesting.com\/samplesiteforselenium#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/artoftesting.com\/samplesiteforselenium"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/artoftesting.com\/samplesiteforselenium#primaryimage","url":"https:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg","contentUrl":"https:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/drag-and-drop-demo.jpg","width":183,"height":57,"caption":"Drag and Drop Demo"},{"@type":"BreadcrumbList","@id":"https:\/\/artoftesting.com\/samplesiteforselenium#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/artoftesting.com\/"},{"@type":"ListItem","position":2,"name":"Sample Webpage for Automation Practice"}]},{"@type":"WebSite","@id":"https:\/\/artoftesting.com\/#website","url":"https:\/\/artoftesting.com\/","name":"ArtOfTesting","description":"A Beginners Guide to Testing","publisher":{"@id":"https:\/\/artoftesting.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/artoftesting.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/artoftesting.com\/#organization","name":"ArtOfTesting","url":"https:\/\/artoftesting.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/artoftesting.com\/#\/schema\/logo\/image\/","url":"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/Artoftesting_logo.png","contentUrl":"http:\/\/artoftesting.com\/wp-content\/uploads\/2019\/12\/Artoftesting_logo.png","width":400,"height":60,"caption":"ArtOfTesting"},"image":{"@id":"https:\/\/artoftesting.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/artoftesting","https:\/\/x.com\/theartoftesting","https:\/\/www.linkedin.com\/groups\/4797819\/","https:\/\/in.pinterest.com\/artoftesting\/","https:\/\/www.youtube.com\/channel\/UCQ9PUVenvvyrUdDQ9yKn31Q"]}]}},"_links":{"self":[{"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/pages\/1089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/comments?post=1089"}],"version-history":[{"count":21,"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/pages\/1089\/revisions"}],"predecessor-version":[{"id":8226,"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/pages\/1089\/revisions\/8226"}],"wp:attachment":[{"href":"https:\/\/artoftesting.com\/wp-json\/wp\/v2\/media?parent=1089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}