<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tutorials | Automation Dojos</title>
	<atom:link href="https://www.automationdojos.com/tag/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.automationdojos.com/tag/tutorials/</link>
	<description>Applied Automation Ops</description>
	<lastBuildDate>Wed, 22 Mar 2023 11:24:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.automationdojos.com/wp-content/uploads/2021/06/Adjo_X_fav_32.png</url>
	<title>Tutorials | Automation Dojos</title>
	<link>https://www.automationdojos.com/tag/tutorials/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Finding Web Elements with Selenium</title>
		<link>https://www.automationdojos.com/finding-web-elements-with-selenium/</link>
					<comments>https://www.automationdojos.com/finding-web-elements-with-selenium/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sat, 09 Mar 2019 23:42:00 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Selenium Tutorials]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[webdriver]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=21080</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/finding-web-elements-with-selenium/">Finding Web Elements with Selenium</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-web-elements-selenium.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" fetchpriority="high" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-web-elements-selenium.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-web-elements-selenium-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-web-elements-selenium-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-web-elements-selenium-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-web-elements-selenium-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>I&#8217;m going to explain in this tutorial about the usage of the findElement and findElements method of Selenium Webdriver on the Chrome web browser. The findElement method is used when you want to deal with one HTML element on a website. On the other hand, the findElements method is used when you want to deal [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/finding-web-elements-with-selenium/">Finding Web Elements with Selenium</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/finding-web-elements-with-selenium/">Finding Web Elements with Selenium</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>

<p class="wp-block-paragraph">I&#8217;m going to explain in this tutorial about the usage of the <em>findElement </em>and <em>findElements </em>method of Selenium Webdriver on the Chrome web browser. The <em>findElement</em> method is used when you want to deal with one HTML element on a website. On the other hand, the <em>findElements</em> method is used when you want to deal with more than one HTML element.</p>



<p class="wp-block-paragraph">In brief, the <span class="su-label su-label-type-default">findElement</span> method returns a single element, and the <span class="su-label su-label-type-default">findElements</span> method returns an array of elements.</p>



<p class="wp-block-paragraph">We will choose a dynamic website &#8211; “BBC News”, to explain this concept in a real scenario. We will use the <em>findElement </em>method to display the headlines of the webpage and we will use <em>findElements </em>methods to display the menu items.</p>



<figure class="wp-block-image size-large is-style-default td-img-style-shadow"><img decoding="async" width="1024" height="549" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-1024x549.png" alt="" class="wp-image-21084" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-1024x549.png 1024w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-300x161.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-768x412.png 768w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-1536x824.png 1536w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-150x80.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-696x373.png 696w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-1068x573.png 1068w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-783x420.png 783w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-200x107.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01-400x215.png 400w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-01.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">First, let&#8217;s have a look at the web page to analyze the HTML code and select the necessary attributes.</p>



<figure class="wp-block-image size-large is-style-default"><img decoding="async" width="1024" height="86" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-1024x86.png" alt="" class="wp-image-21083" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-1024x86.png 1024w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-300x25.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-768x64.png 768w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-150x13.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-696x58.png 696w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-200x17.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02-400x34.png 400w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-02.png 1061w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">We can see that the news headline text appears within the <strong><em>block-link__overlay-link</em></strong> class.&nbsp;</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="802" height="449" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03.png" alt="" class="wp-image-21087" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03.png 802w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-300x168.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-768x430.png 768w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-150x84.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-696x390.png 696w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-750x420.png 750w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-200x112.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-03-400x224.png 400w" sizes="auto, (max-width: 802px) 100vw, 802px" /></figure>



<p class="wp-block-paragraph">The menu items are within anchor tags, which displays as a list inside a div tag. To acquire the menu item text, we need to reference an attribute that points towards all of them. However, the anchor tags are inside the list tags which we can&#8217;t address in common.</p>



<p class="wp-block-paragraph">The div tag has a unique ID that we can use to capture the div. After capturing the div, We will be accessing the UL tag. However, We need to have some techniques to access the &lt;a&gt; tag inside the &lt;ul&gt; list(Example is shown below).</p>


<h3 class="wp-block-heading" id="a-sample-program">A Sample Program</h3>


<p class="wp-block-paragraph">Now let&#8217;s program to demonstrate the above concept using Java language. First, open the Eclipse IDE and create a new class and name it as <strong>BBCNews</strong>.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="812" height="870" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04.png" alt="" class="wp-image-21086" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04.png 812w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-280x300.png 280w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-768x823.png 768w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-150x161.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-300x321.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-696x746.png 696w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-392x420.png 392w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-187x200.png 187w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-04-373x400.png 373w" sizes="auto, (max-width: 812px) 100vw, 812px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="682" height="750" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05.png" alt="" class="wp-image-21085" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05.png 682w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05-273x300.png 273w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05-150x165.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05-300x330.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05-382x420.png 382w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05-182x200.png 182w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-find-webelement-sel-05-364x400.png 364w" sizes="auto, (max-width: 682px) 100vw, 682px" /></figure>
</div>
</div>



<p class="wp-block-paragraph">Next, we will import the necessary libraries.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
</pre>



<p class="wp-block-paragraph">Next, we will instantiate the Chrome WebDriver. For this purpose, we need to set the system property which points to the location of Chrome WebDriver. Then we have to instantiate a WebDriver element (from org.openqa.selenium.WebDriver library) to the Chrome web browser</p>



<pre class="wp-block-code"><code>System.setProperty("webdriver.chrome.driver", "D:\\Chromedriver\\chromedriver.exe"); 
WebDriver driver=new ChromeDriver();
</code></pre>



<p class="wp-block-paragraph">After that, we will assign the URL of the BBC News website to the Chrome WebDriver.</p>



<pre class="wp-block-code"><code>driver.get("https://www.bbc.com/");</code></pre>



<p class="wp-block-paragraph">Now let&#8217;s see how to grab the headline on the webpage using the <em>findElement </em>method. First, we will create a WebElement (from org.openqa.selenium.WebElement library) to store the headline element.</p>



<p class="wp-block-paragraph">The <em>findElement </em>and <em>findElements </em>methods can return the elements in the following ways:</p>



<p class="wp-block-paragraph"><div class="su-list" style="margin-left:0px">



<ul class="wp-block-list"><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> className &#8211; returns elements using <em>class </em>attributes.</li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> id &#8211; returns elements using the <em>id </em>attribute</li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> name &#8211; returns elements using the <em>name </em>attribute</li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> CSS selector &#8211; returns elements using <em>CSS Selector Pattern</em></li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> link text &#8211; returns elements using the visible text within the tags</li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> Partial link text &#8211; returns elements using the text of an attribute inside the tag</li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> tagName &#8211; returns elements using the <em>tag</em></li><li><i class="sui sui-hand-o-right" style="color:#0eab3c"></i> XPath &#8211; returns elements using the <em>xpath</em></li></ul>



<p class="wp-block-paragraph"></div>



<p class="wp-block-paragraph">Obtaining the element using <em>className </em>would be ideal, as the <em>class </em>attribute is available within the anchor tag that holds the headline.</p>



<pre class="wp-block-code"><code>WebElement element = driver.findElement(By.className("block-link__overlay-link"));</code></pre>



<p class="wp-block-paragraph">Finally, let&#8217;s see how to get the menu items using <em>findElements </em>method. We will create a list of WebElements to store all the menu items. You can use the <em>cssSelector </em>or <em>xpath</em>. But, we will use a special technique to combine both <em>findElement </em>&amp; <em>findElements </em>methods.</p>



<p class="wp-block-paragraph">We will locate the <em>div </em>tag using the <em>findElement </em>method and then, we will grab all the anchor tags which hold the menu items using the <em>findElements </em>method.</p>



<pre class="wp-block-code"><code>List&lt;WebElement&gt; elements = driver.findElement(By.id("orb-nav-links")).findElements(By.tagName("a"));</code></pre>



<p class="wp-block-paragraph">We can finally print all the elements using a ‘for loop’. When printing the elements we will use the <em>getAttribute(&#8220;innerHTML&#8221;)</em> so that it prints the text inside the HTML tag!</p>



<p class="wp-block-paragraph">You can see the entire program as below :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">package myPackage;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver; 
public class BBCNews {
public static void main(String[] args) { 
    	System.setProperty("webdriver.chrome.driver", "D:\\chromedriver_win32\\chromedriver.exe"); 
   	WebDriver driver=new ChromeDriver(); 
   	driver.get("https://www.bbc.com/");
   	WebElement element = driver.findElement(By.className("block-link__overlay-link"));
	System.out.println("Headline: " + element.getText());
   	List&lt;WebElement> elements = driver.findElement(By.id("orb-nav-links")).findElements(By.tagName("a"));	
	for (int i=0; i&lt;elements.size();i++){
		System.out.println(elements.get(i).getAttribute("innerHTML"));
	}    	     
	}
}
</pre>


<h3 class="wp-block-heading" id="conclusion">Conclusion</h3>


<p class="wp-block-paragraph">We hope this article helps to understand how both findElement &amp; findElements methods work in different ways. We hope you apply the same concepts to other webpages and come up with new ideas to automate with Selenium WebDriver.</p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/tutorials/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21080" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Tutorials&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21080" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21080" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/tutorials/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21080&title=Tutorials" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Tutorials https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21080" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=21080" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=21080', 'Tutorials', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/finding-web-elements-with-selenium/">Finding Web Elements with Selenium</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/finding-web-elements-with-selenium/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Working with Selenium WebElements</title>
		<link>https://www.automationdojos.com/working-with-selenium-webelements/</link>
					<comments>https://www.automationdojos.com/working-with-selenium-webelements/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sun, 10 Feb 2019 04:40:29 +0000</pubDate>
				<category><![CDATA[Featured Posts]]></category>
		<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Selenium Tutorials]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[webdriver]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=13341</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/working-with-selenium-webelements/">Working with Selenium WebElements</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="280" height="168" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements-280x168.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements.png 575w" sizes="auto, (max-width: 280px) 100vw, 280px" /></p>
<p>Table of Contents 1. Selenium WebElements 2. WebElement Locators 3. Working With Text Box 4. Working With Buttons 5. Checkboxes and Radio Buttons 6. Selecting from Drop-Downs 7. File Uploads 8. Locating Links 9. Summary In our previous tutorial, Getting Started with Selenium WebDriver, we discussed the way to set up the environment for automating [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/working-with-selenium-webelements/">Working with Selenium WebElements</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/working-with-selenium-webelements/">Working with Selenium WebElements</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>

<h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li> <a href="#selenium-webelements">1. Selenium WebElements</a></li>
<li> <a href="#webelements-locaters">2. WebElement Locators</a></li>
<li> <a href="#working-textboxes">3. Working With Text Box</a></li>
<li> <a href="#working-buttons">4. Working With Buttons</a></li>
<li> <a href="#checkboxes-radiobuttons">5. Checkboxes and Radio Buttons</a></li>
<li> <a href="#selecting-dropdowns">6. Selecting from Drop-Downs</a></li>
<li> <a href="#file-uploads">7. File Uploads</a></li>
<li> <a href="#locating-links">8. Locating Links</a></li>
<li> <a href="#summary">9. Summary</a></li>

</ul>


<p>In our previous tutorial, <a href="https://www.automationdojos.com/getting-started-selenium-webdriver/" target="_blank" rel="noopener noreferrer">Getting Started with Selenium WebDriver</a>, we discussed the way to set up the environment for automating testing using Selenium and wrote a basic script to do a simple test. In this tutorial, we will discuss other functionalities of the Selenium Web Driver in depth with examples.</p>
<h2>1. Selenium WebElements</h2>
<p>Web Element is a <strong><em>class in Web Driver</em></strong> to handle different  HTML elements of a web page. It can locate and perform different functionalities upon them. Following are the two methods, commonly used to obtain AUT elements directly and to store them as WebElement objects.</p>
<div class="approved2"><div class="su-list" style="margin-left:0px">
<p> </p>
<ul style="font-size: 13.5px; line-height: 1.65em; overflow: hidden;">
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> findElement() – It returns a single WebElement</li>
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> findElements() – It returns a list of WebElements.</li>
</ul>
</div>
<div class="module-icon"> </div>
</div>
<p>In order to create objects of WebElement, we need to import the package Selenium.WebElement</p>
<div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">
<p>import org.openqa.selenium.WebElement;</p>
</div></div>
<div class="su-spacer" style="height:5px"></div>
<h2>2. WebElement Locators</h2>
<p>Locating different web elements are extremely crucial in testing web pages since the chance of ending up with incorrect elements is higher. Therefore, Selenium WebElement has introduced several different ”Locators” to locate web elements using their unique properties precisely. They can be easily identified using the Selenium IDE or Browser’s Developer Tool. Below is a list of Locators and their syntaxes.</p>
<div class="su-table su-table-alternate su-table-fixed">
<table width="525">
<tbody>
<tr>
<td width="125"><strong>Locator</strong></td>
<td width="200"><strong>Syntax</strong></td>
<td width="200"><strong>Description</strong></td>
</tr>
<tr>
<td width="125">ID</td>
<td width="200">driver.findElement(By.id(&#8220;&lt;ID_OF_THE_ELEMENT&gt;&#8221;)</td>
<td width="200"> Finds element using ID attribute.</td>
</tr>
<tr>
<td width="125">name</td>
<td width="200">driver.findElement(By.name(&#8220;&lt;NAME_OF_THE_ELEMENT&gt;&#8221;)</td>
<td width="200"> Finds element using name attribute</td>
</tr>
<tr>
<td width="125">className</td>
<td width="200">driver.findElement(By.className(&#8220;&lt;CLASS_NAME_OF_THE_ELEMENT&gt;&#8221;)</td>
<td width="200"> Finds element using their class</td>
</tr>
<tr>
<td width="125">linkText</td>
<td width="200">driver.findElement(By.linkText(&#8220;&lt;TEXT_IN_THE_LINK&gt;&#8221;)</td>
<td width="200"> Finds element using text in the link</td>
</tr>
<tr>
<td width="125">partialLinkText</td>
<td width="200">driver.findElement(By.partialLinkText(&#8220;&lt;PARTIAL_TEXT_IN_THE_LINK&gt;&#8221;)</td>
<td width="200"> Finds element using part of the text in the link</td>
</tr>
<tr>
<td width="125">xpath</td>
<td width="200">driver.findElement(By.xpath(&#8220;&lt;xpath_OF_THE_ELEMENT&gt;&#8221;)</td>
<td width="200"> Finds element using xpath attribute</td>
</tr>
<tr>
<td width="125">cssSelector</td>
<td width="200">driver.findElement(By.cssSelector(&#8220;&lt;cssSelector_OF_THE_ELEMENT&gt;&#8221;)</td>
<td width="200"> Finds element using css selector</td>
</tr>
<tr>
<td width="125">tagName</td>
<td width="200">driver.findElement(By.id(&#8220;&lt;tagName_OF_THE_ELEMENT&gt;&#8221;)</td>
<td width="200"> Finds element using name of their tag</td>
</tr>
</tbody>
</table>
</div>
<p>Once the elements are located, different functionalities can be performed on them. In this tutorial, we will be using a <a href="https://www.toolsqa.com/automation-practice-form/">sample web form</a> to explain how Selenium WebElements can be used to test its various form elements.</p>
<div class="su-spacer" style="height:5px"></div>
<h2>3. Working With Text Box</h2>
<p>Initially, we need to create WebElements for the ‘Firstname’ and ‘Lastname’ fields.<img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13354" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements1.png" alt="" width="616" height="66" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements1.png 616w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements1-300x32.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements1-200x21.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements1-400x43.png 400w" sizes="auto, (max-width: 616px) 100vw, 616px" /></p>
<div class="attention">
<div class="typo-icon">
<p style="font-size: 13.5px;">Note that the “firstname” is located by the “name” attribute, and the “lastname” is located by the “id” attribute.</p>
</div>
</div>
<p>Once the element objects are made, the first thing to do is to clear the text, which is already in the text field. This is done by the clear() method.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13355" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements2.png" alt="" width="303" height="105" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements2.png 303w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements2-300x105.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements2-200x69.png 200w" sizes="auto, (max-width: 303px) 100vw, 303px" /></p>
<p>Finally, we can enter the relevant text using the sendKeys() method by sending the text value as the parameter.</p>
<div class="su-spacer" style="height:5px"></div>
<h2>4. Working With Buttons</h2>
<p>Buttons are usually accessed through the click() method. In the case of Submit buttons, the submit() method will be used to submit all the inputs to the server.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13356" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements3.png" alt="" width="700" height="73" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements3.png 710w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements3-300x31.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements3-200x21.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements3-400x41.png 400w" sizes="auto, (max-width: 700px) 100vw, 700px" /></p>
<p>In this case, the className is used as the locator to find the button.</p>
<div class="su-spacer" style="height:5px"></div>
<h2>5. Checkboxes and Radio Buttons</h2>
<p>Toggling checkboxes on or off and selecting radio buttons are done using the click() method.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13357" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements4.png" alt="" width="690" height="239" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements4.png 690w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements4-300x104.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements4-200x69.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements4-400x139.png 400w" sizes="auto, (max-width: 690px) 100vw, 690px" /></p>
<p>The checkbox element is located using its XPath. This code checks if the checkbox is selected or not and then prints a message.</p>
<p>In the case of Radio Buttons, it is located using cssSelector.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13347" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements5.png" alt="" width="726" height="183" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements5.png 726w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements5-300x76.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements5-200x50.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements5-400x101.png 400w" sizes="auto, (max-width: 726px) 100vw, 726px" /></p>
<div class="su-spacer" style="height:5px"></div>
<h2>6. Selecting from Drop-Downs</h2>
<p>Before selecting values from a drop-down, we need to import a package.</p>
<div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">import org.openqa.selenium.support.ui.Select;<br /></div></div>
<p>Once that is done, we can declare the drop-down as a Select object.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13348" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements6.png" alt="" width="700" height="63" /></p>
<p>Now we can control the drop-down by selecting its values using different methods defined in the Select class.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13349" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements7.png" alt="" width="567" height="49" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements7.png 567w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements7-300x26.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements7-200x17.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements7-400x35.png 400w" sizes="auto, (max-width: 567px) 100vw, 567px" /></p>
<p>We can repeat the above code with different parameters when selecting multiple items.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13350" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements8.png" alt="" width="700" height="95" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements8.png 757w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements8-300x41.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements8-200x27.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements8-400x55.png 400w" sizes="auto, (max-width: 700px) 100vw, 700px" /></p>
<div class="su-spacer" style="height:5px"></div>
<h2>7. File Uploads</h2>
<p>There are a couple of solutions available for implementing &#8216;File Upload&#8217; functionality within your selenium scripts. However, not all solutions may work on all applications because at times it may depend on typical &#8216;design or kind of implementation&#8217; your application or website uses at the backend and/or client end.</p>
<p>However here is one such, simple implementation for File uploading. In the below snippet &#8216;File Uploading&#8217; is simply done by locating the file-select input field and by entering the path of the file to be uploaded using the sendKeys() method.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13351" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements9.png" alt="" width="649" height="63" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements9.png 649w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements9-300x29.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements9-200x19.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements9-400x39.png 400w" sizes="auto, (max-width: 649px) 100vw, 649px" /></p>
<div class="su-spacer" style="height:5px"></div>
<h2>8. Locating Links</h2>
<p>We can locate links and access them using the linkText() and partialLinkText() locators. In the below example, we will obtain the link with its complete text using linkText() and part of the link text using partialLinkText() locator.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13352" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements10.png" alt="" width="212" height="115" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements10.png 212w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements10-200x108.png 200w" sizes="auto, (max-width: 212px) 100vw, 212px" /><br /><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13353" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements11.png" alt="" width="547" height="149" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements11.png 547w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements11-300x82.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements11-200x54.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium_webelements11-400x109.png 400w" sizes="auto, (max-width: 547px) 100vw, 547px" /></p>
<p>Here is the complete code.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="java">package newPackage;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.firefox.FirefoxDriver;

public class myClass {

   public static void main(String[]args) throws InterruptedException{
      System.setProperty("webdriver.gecko.driver", "C:\\geckodriver\\geckodriver.exe");
      
      WebDriver driver = new FirefoxDriver();
      
      String baseUrl = "https://www.toolsqa.com/automation-practice-form/";
        String pageTitle="";
      driver.get(baseUrl);
      
      //Clicking a link text using linkText Locator
      driver.findElement(By.linkText("Partial Link Test")).click();
      System.out.println(driver.getTitle());
      Thread.sleep(1000);
      
      //Clicking a link text using partialLinkText Locator
      driver.findElement(By.partialLinkText("Partial")).click();
      System.out.println(driver.getTitle());
      
      //Capturing the page title
      pageTitle = driver.getTitle();
      
      //Get webElements for First name and Last name text boxes
      //Locator by name
      WebElement firstName= driver.findElement(By.name("firstname"));
      //Locator by Id
      WebElement lastName= driver.findElement(By.id("lastname"));
      
      //Clearing the text fields
      firstName.clear();
      lastName.clear();
      
      //Entering values to the text field
      firstName.sendKeys("John");
      lastName.sendKeys("Doe");
      
      //Get webElements for gender radio buttons using cssSelector
      WebElement radioMale=driver.findElement(By.cssSelector("input#sex-0"));
      //Selecting it using click()method and printing their values.
      radioMale.click();
      System.out.println("Male Selected");
      
      WebElement radioFmale=driver.findElement(By.cssSelector("input#sex-1"));
      radioFmale.click();
      System.out.println("Female Selected");
      
      //Selecting years of experience radio button
      WebElement yrsExp= driver.findElement(By.id("exp-2"));
      yrsExp.click();
      //Printing the number of experience selected
      System.out.println("Years of Experience = " + yrsExp.getText());
      
      //Entering values in Date text box
      WebElement date= driver.findElement(By.id("datepicker"));
      date.sendKeys("17-12-2019");
      
      //Selecting Profession Check box
      WebElement prof= driver.findElement(By.id("profession-0"));
      prof.click();
      
      //uploading a file
      WebElement uploadElement = driver.findElement(By.id("photo"));
      uploadElement.sendKeys("C:\\profilePic.jpg");
      
      //Creating web element for selecting Automation tool using xpath
      WebElement selQtp= driver.findElement(By.xpath("//*[@id=\'tool-0']"));
      // Toggling on and off to see if selected
      selQtp.click();	
      
      if (selQtp.isSelected())
         System.out.println("QTP Selected");
      else
         System.out.println("QTP Not Selected");
      //Unchecking
      selQtp.click();	
      
      if (!selQtp.isSelected())
         System.out.println("QTP Not Selected");
      
      //Selecting single continent using drop down
      Select singleContiDrp = new Select(driver.findElement(By.id("continents")));
      
      singleContiDrp.deselectByVisibleText("South America");
      
      //Selecting multiple continent using drop down
      Select contiDrp = new Select(driver.findElement(By.id("continentsmultiple")));
      
      contiDrp.deselectByVisibleText("Asia");
      contiDrp.deselectByVisibleText("Europe");
      
      //Locating button using className
      WebElement firstBtn= driver.findElement(By.className("btn btn-info"));
      firstBtn.click();
   
      
      Thread.sleep(1000);
      if (pageTitle.contentEquals(driver.getTitle())){
         System.out.println("Test Passed!");

         } else {

         System.out.println("Test Failed");}	 
      driver.close();
      
   }
   
}</pre>
<div class="su-spacer" style="height:5px"></div>
<h2>9. Summary</h2>
<div class="su-list" style="margin-left:0px">
<ul>
<li><i class="sui sui-arrow-right" style="color:#68b63a"></i> Selenium web driver captures different form elements using Selenium WebElements.</li>
<li><i class="sui sui-arrow-right" style="color:#68b63a"></i> WebElement uses different properties like ID, name, className, cssSelector, link text, and xpath of the form elements to locate them using the findElement() method.</li>
<li><i class="sui sui-arrow-right" style="color:#68b63a"></i> The sendKey() method is used to enter values to the text field, and a clear() method is used to delete values in the text field.</li>
<li><i class="sui sui-arrow-right" style="color:#68b63a"></i> Buttons, Radio buttons, and Checkboxes can be clicked using the Click() method.</li>
<li><i class="sui sui-arrow-right" style="color:#68b63a"></i> Dropdowns should be instantiated as an object of the ‘Select’ class to control them within a Selenium script.</li>
</ul>
</div>


<p class="wp-block-paragraph"></p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/tutorials/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13341" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Tutorials&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13341" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13341" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/tutorials/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13341&title=Tutorials" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Tutorials https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13341" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=13341" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=13341', 'Tutorials', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/working-with-selenium-webelements/">Working with Selenium WebElements</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/working-with-selenium-webelements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Started with Selenium WebDriver</title>
		<link>https://www.automationdojos.com/getting-started-selenium-webdriver/</link>
					<comments>https://www.automationdojos.com/getting-started-selenium-webdriver/#comments</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sun, 07 Oct 2018 00:44:51 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Selenium Tutorials]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[webdriver]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=13224</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/getting-started-selenium-webdriver/">Getting Started with Selenium WebDriver</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="280" height="168" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0-280x168.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium-0.png 575w" sizes="auto, (max-width: 280px) 100vw, 280px" /></p>
<p>Table of Contents 1. Selenium and Selenium Web Driver 2. Setting-Up the Environment 3. Test Script with Selenium Web Driver 3.1) Creating a project 3.2) Creating a Class 4. Code a Simple Selenium Script 5. Running the test Testing is a critical step in the Software Development Life Cycle. Software testing helps to ensure the [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/getting-started-selenium-webdriver/">Getting Started with Selenium WebDriver</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/getting-started-selenium-webdriver/">Getting Started with Selenium WebDriver</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>

<h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li> <a href="#selenium-webelements">1. Selenium and Selenium Web Driver</a></li>
<li> <a href="#webelements-locaters">2. Setting-Up the Environment</a></li>
<li> <a href="#working-textboxes">3. Test Script with Selenium Web Driver</a>
<ul>
<li><a href="#webelements-locaters">3.1) Creating a project</a></li>
<li><a href="#webelements-locaters">3.2) Creating a Class</a></li>
</ul>
</li>
<li> <a href="#working-buttons">4. Code a Simple Selenium Script</a></li>
<li> <a href="#checkboxes-radiobuttons">5. Running the test</a></li>

</ul>


<p>Testing is a critical step in the Software Development Life Cycle. Software testing helps to ensure the quality and effectiveness of the final product.</p>
<p>Automated Functional testing automates the process of testing and validating each functionality in the software through the execution of pre-defined Automation scripts. This is mainly done for test cases that need to be repeated and are tedious to perform manually.</p>
<div class="su-spacer" style="height:5px"></div>
<h2>1. Selenium and Selenium Web Driver?</h2>
<p>Selenium is a collection of specialized tools for automating the testing process of web-based applications. This free and open-source tool can be used across different browsers and platforms.</p>
<p>Selenium Web driver is a browser automated framework and accepts written scripts and controls browsers directly. Furthermore, it supports test scripts written in several different languages such as Java, JavaScript, PHP, Python, and C#.</p>
<h2>2. Setting-Up the Environment</h2>
<p>The following prerequisites must be satisfied to create and run automated test scripts using Selenium.</p>
<div class="approved2">
<div class="su-list" style="margin-left:0px">
<ul style="font-size: 13.5px;">
<li style="list-style-type: none;">
<ul style="font-size: 13.5px;">
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> <strong>Installing Java Development Kit (JDK)</strong></li>
</ul>
</li>
</ul>
<p>If JDK is not already available on your computer, downloaded it from <a href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">here</a>.<br>Make sure you download the exact JDK specified for your Operating System. Once you install it, configure it as shown in <a href="https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html">this tutorial</a>.</p>
<ul style="font-size: 13.5px;">
<li style="list-style-type: none;">
<ul style="font-size: 13.5px;">
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> <strong>Installing Eclipse IDE</strong></li>
</ul>
</li>
</ul>
<p>Download the latest version of Eclipse IDE for Java Developers from <a href="https://www.eclipse.org/downloads/">here</a> and install it with the installation wizard.</p>
<ul style="font-size: 13.5px;">
<li style="list-style-type: none;">
<ul style="font-size: 13.5px;">
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> <strong>Download Selenium Client Drive</strong></li>
</ul>
</li>
</ul>
<p>Download Selenium Client Driver from their <a href="https://selenium.dev/downloads/">official site</a>. Make sure to choose the language Java when selecting the client driver.</p>
<ul style="font-size: 13.5px;">
<li style="list-style-type: none;">
<ul style="font-size: 13.5px;">
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> <strong>Configure Eclipse IDE with Web Driver</strong></li>
</ul>
</li>
</ul>
<p>Selenium is a set of .jar files, so it only needs to be configured within the Eclipse IDE. Follow these <a href="https://www.softwaretestingmentor.com/how-to-setup-selenium-webdriver-in-eclipse-ide/">steps</a>.</p>
<p style="margin-bottom: 5px;"><em><strong>Note:</strong> Select the latest “stable” version, instead of the latest version as it could be unstable.</em></p>
</div>
<div class="module-icon">&nbsp;</div>
</div>
<h2>3. Test Script with Selenium Web Driver</h2>
<h3>3.1) Creating a project</h3>
<ol>
<li>Launch Eclipse from the Start Menu or by double-clicking “eclipse.exe” in the folder “eclipse” where it was installed.</li>
<li>To create a new Project, go to <strong>File </strong>&gt; <strong>New</strong> and select</li>
</ol>
<ol>
<li style="list-style-type: none;">&nbsp;</li>
</ol>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13231" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium1.png" alt="" width="545" height="310"></p>
<p>3. Now name the project. I’ll be using “FirstWebDriverProject‘.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13232" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium2.png" alt="" width="410" height="380" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium2.png 410w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium2-300x278.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium2-200x185.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium2-400x371.png 400w" sizes="auto, (max-width: 410px) 100vw, 410px" /></p>
<p>4. Then click “Finish”. The project will be created and displayed in the Package Explorer.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13233" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium3.png" alt="" width="345" height="90" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium3.png 345w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium3-300x78.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium3-200x52.png 200w" sizes="auto, (max-width: 345px) 100vw, 345px" /></p>
<p>5. Right-click the project and select <strong>New </strong>&gt;Package</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13234" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium4.png" alt="" width="506" height="157" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium4.png 506w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium4-300x93.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium4-200x62.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium4-400x124.png 400w" sizes="auto, (max-width: 506px) 100vw, 506px" /></p>
<p>6. Name the package “newPackage” and click Finish.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13227" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium5.png" alt="" width="387" height="357" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium5.png 387w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium5-300x277.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium5-200x184.png 200w" sizes="auto, (max-width: 387px) 100vw, 387px" /></p>
<div class="su-spacer" style="height:5px"></div>
<h3>3.2) Creating a Class</h3>
<ol>
<li>Right-click on the package and select <strong>New</strong> &gt; <strong>Class</strong>.</li>
</ol>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13228" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium6.png" alt="" width="491" height="191" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium6.png 491w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium6-300x117.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium6-200x78.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium6-400x156.png 400w" sizes="auto, (max-width: 491px) 100vw, 491px" /></p>
<p>2. Give the name ‘myClass’ and click Finish.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13229" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium7.png" alt="" width="385" height="458" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium7.png 385w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium7-252x300.png 252w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium7-168x200.png 168w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium7-336x400.png 336w" sizes="auto, (max-width: 385px) 100vw, 385px" /></p>
<div class="su-spacer" style="height:5px"></div>
<h2>4. Code a Simple Selenium Script</h2>
<p>We will now use the new Class to write a script in Selenium Web Driver using Firefox. It will fetch the site <a href="https://www.airbnb.com/">https://www.airbnb.com/</a>, verify the title, print out the result and close the browser.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="java">package newPackage;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class myClass {

   public static void main(String[]args) throws InterruptedException{
      System.setProperty("webdriver.gecko.driver", "C:\\geckodriver\\geckodriver.exe");
      
      WebDriver driver = new FirefoxDriver();
      
      String baseUrl = "https://www.airbnb.com/";
        String expectedTitle = "Vacation Rentals, Homes, Experiences &amp; Places - Airbnb";
        String actualTitle="";
      driver.get(baseUrl);
      actualTitle = driver.getTitle();
      if (actualTitle.contentEquals(expectedTitle)){
         System.out.println("Test Passed!");

         } else {

         System.out.println("Test Failed");}	 
      driver.close();
      System.exit(0);
   }
   
}</pre>
<div class="su-spacer" style="height:15px"></div>
<p><strong>Let’s analyse and understand this code in bit detail:</strong></p>
<div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">
<h4>Importing Packages</h4>
<p class="dropcap"><span class="dropcap">1</span><span class="su-label su-label-type-default">import org.openqa.selenium.WebDriver;</span>Import the Web Driver interface necessary to instantiate a new browser with specific drivers.<span class="su-label su-label-type-default">import org.openqa.selenium.firefox.FirefoxDriver;</span> References the Firefox class driver needed to instantiate a Firefox-specific driver into the browser instantiated by the Selenium Web Driver.</p>
<h4>Instantiating Objects and Variables</h4>
<p class="dropcap"><span class="dropcap">2</span><span class="su-label su-label-type-default">WebDriver driver = new FirefoxDriver();</span> Here a driver object of the WebDriver class is instantiated, as no parameters are specified a default Firefox browser will open in safe mode. Additionally, we have saved the URL in the string variable <strong>“baseUrl”</strong> and the text to verify in <strong>“expectedText”</strong>. <strong>“actualText”</strong> will be used to save the text found on the site.</p>
<h4>Instantiating Gecko Driver</h4>
<p class="dropcap"><span class="dropcap">3</span>Selenium 3 and the latest versions of Firefox have compatibility issues. To resolve them, download and install Gecko driver from <a href="https://github.com/mozilla/geckodriver/releases">here</a> and set its system property in the code.<em>System.setProperty(&#8220;webdriver.gecko.driver&#8221;,&#8221;C:\\geckodriver\\geckodriver.exe&#8221;</em></p>
<h4>Starting a Browser Session and Opening a URL</h4>
<p class="dropcap"><span class="dropcap">4</span><span class="su-label su-label-type-default">driver.get(baseUrl);</span>The driver’s (get) method helps to open up a new browser session and directs it to the URL given as the parameter.</p>
<h4>Verify the Required Element</h4>
<p class="dropcap"><span class="dropcap">5</span><span class="su-label su-label-type-default">actualTitle = driver.getTitle();</span>The getTitle() method in the Web driver interface will capture the title of the current page.</p>
<h4>Compare Values</h4>
<p class="dropcap"><span class="dropcap">6</span>This is a normal Java if-else statement used to compare the expected and the actual text values and print out the result in the console.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="java">if (actualTitle.contentEquals(expectedTitle)) {

System.out.println("Test Passed!");

} else {

System.out.println("Test Failed");}</pre>
<p></p>
<h4>Close Browser</h4>
<p class="dropcap"><span class="dropcap">7</span><span class="su-label su-label-type-default">driver.close();</span>The “close()” method is used to close the browser session.</p>
<h4>Terminate Program</h4>
<p class="dropcap"><span class="dropcap">8</span><span class="su-label su-label-type-default">System.exit(0);</span>This is used to terminate the entire program. We should make sure to close the browser first since terminating just the program will leave the browser open.</p>
</div></div>
<div class="su-spacer" style="height:5px"></div>
<h2>5. Running the test</h2>
<p>To run the test script, click <strong>Run</strong> &gt; <strong>Run</strong> in the Eclipse menu. Alternatively, you can press Ctrl + F11.</p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13249" style="margin-top: 15px; margin-bottom: 20px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-selenium81.png" alt="" width="700" height="385"></p>
<p>Once everything is done Eclipse will print out the result in its console.</p>
<p>This is just a simple example. There is a lot more that can be done with Selenium. Use this example as the beginning of your Selenium journey!</p>
<div class="su-spacer" style="height:10px"></div><div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/tutorials/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13224" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Tutorials&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13224" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13224" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/tutorials/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13224&title=Tutorials" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Tutorials https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13224" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=13224" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=13224', 'Tutorials', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/getting-started-selenium-webdriver/">Getting Started with Selenium WebDriver</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/getting-started-selenium-webdriver/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Started with Apache JMeter</title>
		<link>https://www.automationdojos.com/getting-started-with-apache-jmeter/</link>
					<comments>https://www.automationdojos.com/getting-started-with-apache-jmeter/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sun, 19 Aug 2018 17:43:24 +0000</pubDate>
				<category><![CDATA[JMeter]]></category>
		<category><![CDATA[JMeter Tutorials]]></category>
		<category><![CDATA[NFT Automation]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Video Posts]]></category>
		<category><![CDATA[jmeter]]></category>
		<category><![CDATA[NFT]]></category>
		<category><![CDATA[Performance testing]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[video-posts]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=13183</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/getting-started-with-apache-jmeter/">Getting Started with Apache JMeter</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="280" height="168" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0-280x168.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter-0.png 575w" sizes="auto, (max-width: 280px) 100vw, 280px" /></p>
<p>1. Introduction As a developer, you may have tested the functionality of your code hundreds of times during development. This is known as functional testing. Despite how familiar you are with your product, users will approach it differently and have many different use cases. That’s why you need Non-Functional Testing (NFT). Performance, Security, Usability, and [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/getting-started-with-apache-jmeter/">Getting Started with Apache JMeter</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/getting-started-with-apache-jmeter/">Getting Started with Apache JMeter</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<div role="navigation" aria-label="Table of Contents" class="simpletoc blog-post-toc toc-none wp-block-simpletoc-toc"><h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li><a href="#1-introduction">1. Introduction</a>

</li>
<li><a href="#2-watch-installation-video">2. Watch Installation Video</a>

</li>
<li><a href="#3-download-and-install">3. Download and Install</a>

</li>
<li><a href="#4-creating-a-test-plan">4. Creating a Test Plan</a>

</li>
<li><a href="#5-adding-a-thread-group">5. Adding a Thread Group</a>

</li>
<li><a href="#6-adding-jmeter-elements">6. Adding JMeter Elements</a>

</li>
<li><a href="#7-making-http-requests">7. Making HTTP Requests</a>

</li>
<li><a href="#8-graph-result-implementation">8. Graph Result Implementation</a>

</li>
<li><a href="#9-run-and-get-the-results">9. Run and Get the Results</a>
</li></ul></div>

<h2 class="wp-block-heading" id="1-introduction">1. Introduction</h2>


<p class="wp-block-paragraph">As a developer, you may have tested the functionality of your code hundreds of times during development. This is known as functional testing. Despite how familiar you are with your product, users will approach it differently and have many different use cases. That’s why you need Non-Functional Testing (NFT). </p>



<p class="wp-block-paragraph">Performance, Security, Usability, and Reliability are just some of the many NF aspects that can be tested to ensure a better user experience. Apache JMeter is one of the best ‘Open Source and Free Tool’ that you can use for NFT. It can be used to perform Load Testing, Performance Testing, Scalability Testing, and more.</p>


<h2 class="wp-block-heading" id="2-watch-installation-video">2. Watch Installation Video</h2>

<div class="su-youtube su-u-responsive-media-yes"><iframe loading="lazy" width="600" height="400" src="https://www.youtube.com/embed/Mr4oQwRUUms?" frameborder="0" allowfullscreen allow="autoplay; encrypted-media; picture-in-picture" title=""></iframe></div>


<div class="su-spacer" style="height:10px"></div>


<h2 class="wp-block-heading" id="3-download-and-install">3. Download and Install</h2>

<div class="su-list" style="margin-left:0px">
<ul>
<li><i class="sui sui-check" style="color:#68b63a"></i> <strong>Step 1</strong>: Install the latest version of the Java SE Development Kit. Download it <a href="https://www.oracle.com/java/technologies/downloads/#java8" target="_blank" rel="noreferrer noopener">here</a>.</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> <strong>Step 2</strong>: Download the latest JMeter binaries from <a href="https://jmeter.apache.org/download_jmeter.cgi" target="_blank" rel="noreferrer noopener">here</a>.</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> <strong>Step 3</strong>: Install and launch JMeter as follows:
<ul>
<li><i class="sui sui-check" style="color:#68b63a"></i> Unzip the downloaded JMeter zip file to the intended install folder.</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> Open the extracted folder and go to <span class="su-label su-label-type-default">\Apache JMeter\apache-jmeter-5.2.1\bin</span>.</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> Run the &#8216;<em>.bat</em>&#8216; file and you are good to go.</li>
</ul>
</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> <strong>Step 4</strong>: Identify the basic components of JMeter.</li>
</ul>
</div>


<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="967" height="459" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter1.png" alt="" class="wp-image-13184" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter1.png 967w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter1-300x142.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter1-768x365.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter1-200x95.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter1-400x190.png 400w" sizes="auto, (max-width: 967px) 100vw, 967px" /></figure>
</div>


<p class="wp-block-paragraph">Now you have a basic idea of JMeter and its components. Let’s try a real-world example for a better understanding. Simply follow these steps to test&nbsp;<strong>youtube.com</strong>&nbsp;as our website.</p>



<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<h2 class="wp-block-heading" id="4-creating-a-test-plan">4. Creating a Test Plan</h2>


<p class="wp-block-paragraph">Let’s start by creating a New Test Plan for our test.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="760" height="132" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter2.png" alt="" class="wp-image-13185" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter2.png 760w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter2-300x52.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter2-200x35.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter2-400x69.png 400w" sizes="auto, (max-width: 760px) 100vw, 760px" /></figure>
</div>


<ol class="wp-block-list">
<li>Start JMeter</li>



<li><strong>Go to File &gt; New&nbsp;</strong>and add a&nbsp;<strong>Test Plan</strong>&nbsp;and give it a name<strong>.</strong></li>
</ol>



<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<h2 class="wp-block-heading" id="5-adding-a-thread-group">5. Adding a Thread Group</h2>


<p class="wp-block-paragraph">This section details setting up a certain number of Threads that will be used for our test. You can do so by following these steps:</p>



<ol class="wp-block-list">
<li>Right-click on the newly created Test Plan which will be displayed in the Test Plan Pane.</li>



<li><strong>Click Add &gt; Threads (Users) &gt;&nbsp;</strong>click&nbsp;<strong>Thread Group</strong></li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="814" height="441" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter3.png" alt="" class="wp-image-13186" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter3.png 814w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter3-300x163.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter3-768x416.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter3-200x108.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter3-400x217.png 400w" sizes="auto, (max-width: 814px) 100vw, 814px" /></figure>
</div>


<p class="wp-block-paragraph">Then you have to add the thread properties by clicking your thread group. You can add the Thread name and thread properties that are suitable for your test. I added data as follows:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="983" height="437" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter4.png" alt="" class="wp-image-13187" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter4.png 983w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter4-300x133.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter4-768x341.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter4-200x89.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter4-400x178.png 400w" sizes="auto, (max-width: 983px) 100vw, 983px" /></figure>
</div>


<p class="wp-block-paragraph">Based on my values:</p>



<ol class="wp-block-list">
<li><strong>Number of Threads:</strong>&nbsp;100 users being connected to our Server application will be simulated.</li>



<li><strong>Ramp-up Period:</strong>&nbsp;The 100 threads will be generated within a period of 10 seconds.</li>



<li><strong>Loop Count:</strong>&nbsp;The test will be looped (repeated) 10 times.</li>
</ol>



<p class="wp-block-paragraph">Also, you can define thread time and thread start delay if needed. I have not used those features in order to keep this tutorial simple.</p>



<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<h2 class="wp-block-heading" id="6-adding-jmeter-elements">6. Adding JMeter Elements</h2>


<p class="wp-block-paragraph">Elements are individual tests that will be executed as part of our Test Plan.</p>



<p class="wp-block-paragraph"><strong>HTTP requests</strong>&nbsp;can be added by right-clicking the newly created Thread Group and selecting&nbsp;<strong>Add &gt; Config Element &gt; HTTP Request Defaults.</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="860" height="572" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter5.png" alt="" class="wp-image-13176" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter5.png 860w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter5-300x200.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter5-768x511.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter5-200x133.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter5-400x266.png 400w" sizes="auto, (max-width: 860px) 100vw, 860px" /></figure>
</div>


<p class="wp-block-paragraph">In the HTTP Request Defaults add your website name under&nbsp;<strong>Basic &gt; WebServer &gt; Server Name or IP:</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="960" height="245" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter6.png" alt="" class="wp-image-13177" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter6.png 960w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter6-300x77.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter6-768x196.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter6-200x51.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter6-400x102.png 400w" sizes="auto, (max-width: 960px) 100vw, 960px" /></figure>
</div>


<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<h2 class="wp-block-heading" id="7-making-http-requests">7. Making HTTP Requests</h2>


<p class="wp-block-paragraph">You can add an HTTP Request by right-clicking on&nbsp;<strong>Thread Group&nbsp;</strong>and selecting<strong>&nbsp;Add &gt; Sampler &gt; HTTP Request.</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="988" height="587" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter7.png" alt="" class="wp-image-13178" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter7.png 988w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter7-300x178.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter7-768x456.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter7-200x119.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter7-400x238.png 400w" sizes="auto, (max-width: 988px) 100vw, 988px" /></figure>
</div>


<p class="wp-block-paragraph">JMeter HTTP Request Sampler lets the user send HTTP/HTTPS requests to the webserver that we need to access. If we need to access the trending section on YouTube we can simply add&nbsp;<strong>/feed/trending</strong>&nbsp;in the path section.</p>



<p class="wp-block-paragraph"><strong>I have not added the path here so that our tests are executed on Youtube.com servers.</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter81.png" alt="" class="wp-image-13179"/></figure>
</div>


<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<h2 class="wp-block-heading" id="8-graph-result-implementation">8. Graph Result Implementation</h2>


<p class="wp-block-paragraph">To add graphically viewable results just Right-click the newly created Test Plan, select&nbsp;<strong>Add &gt; Listener &gt; Graph Results.</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter9.png" alt="" class="wp-image-13179"/></figure>
</div>


<div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>


<h2 class="wp-block-heading" id="9-run-and-get-the-results">9. Run and Get the Results</h2>


<p class="wp-block-paragraph">Firstly, save your work. Now run your tests and obtain the results by clicking the “Run” button on the Menu Bar. The real-time results will be displayed on Graph Results.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://automationdojos.com/wp-content/uploads/2020/05/post_getting-started-JMeter10.png" alt="" class="wp-image-13179"/></figure>
</div>


<p class="wp-block-paragraph">The above results show the results for our tests on youtube.com:</p>


<div class="su-list" style="margin-left:0px">
<ul>
<li><i class="sui sui-line-chart" style="color:#777"></i> <strong>Red</strong>: Shows the Standard Deviation of our results.</li>
<li><i class="sui sui-line-chart" style="color:#777"></i> <strong>Black</strong>: Signifies the number of sample requests that have been sent to the server.</li>
<li><i class="sui sui-line-chart" style="color:#777"></i> <strong>Blue</strong>: Represents the average number of samples sent.</li>
<li><i class="sui sui-line-chart" style="color:#777"></i> <strong>Green</strong>: Represents the throughput of our results. It refers to the total number of requests handled per minute by the server.</li>
</ul>
</div>


<p class="wp-block-paragraph"><strong>Throughput</strong>&nbsp;and&nbsp;<strong>Deviation&nbsp;</strong>are the most important parameters that we can use to analyze our results. If the throughput is high, we can generally assume that the server has performed well, though this is not always the case. On the other hand, if the Deviation is low, we can assume our web application has performed well.</p>



<p class="wp-block-paragraph">The above graph results show high throughput and low deviation. These results are very good and they are no surprise considering that YouTube is a popular service. It has been highly optimized in terms of both server performance and web application performance.</p>



<p class="wp-block-paragraph">I recommend that you try JMeter to analyze your web application because of its simple GUI, free open-source nature, support for a variety of server types, and platform-independent nature. It will make your testing process much smoother and more convenient.</p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/tutorials/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13183" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Tutorials&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13183" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13183" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/tutorials/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13183&title=Tutorials" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Tutorials https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13183" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=13183" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=13183', 'Tutorials', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/getting-started-with-apache-jmeter/">Getting Started with Apache JMeter</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/getting-started-with-apache-jmeter/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>VBS Part 2 &#8211; Fundamentals and Concepts</title>
		<link>https://www.automationdojos.com/vbs-part-2-concepts/</link>
					<comments>https://www.automationdojos.com/vbs-part-2-concepts/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 12:09:34 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Tutorials]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=173</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>Having gone through the Introductory part, it is time to look at some crucial fundamentals and concepts. This article is to refresh some of the key facts and features of VBScript. In the least, you should consider the following six points for developing a fundamental understanding of VBScript. Though we will cover these concepts in [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p><p style="text-align: justify;">Having gone through the Introductory part, it is time to look at some crucial fundamentals and concepts. This article is to refresh some of the key facts and features of VBScript. In the least, you should consider the following six points for developing a fundamental understanding of VBScript.</p>
<p>Though we will cover these concepts in depth along with examples in the subsequent tutorials, but for now these brief points are enough for you to understand &#8216;what you can or should do with VBScript&#8217;. So without further ado, let&#8217;s jump on to these concepts.</p>
<div class="rt-block">
<h3 style="text-align: justify;">VBScript is a Scripting Language</h3>
<p style="text-align: justify;">&#8216;VBScript&#8217; is a &#8216;scripting language&#8217;! What does this mean? Well, a vague difference between a programming and scripting is that a scripting language is not pre-compiled until runtime and hence while the end product of a programming language is mostly a compiled binary executable program (example; .exe), the end product of a scripting language is rather the source code itself (example; .vbs file)!<br />
Hence unlike C++, VB or other compiled programming languages, the &#8216;VBScript&#8217; is essentially an <span class="su-label su-label-type-default">&#8216;interpreted language&#8217; which is interpreted by &#8216;VBScript Engine&#8217; at runtime</span> i.e. every time the code is actually executed it is interpreted (or compiled internally).</p>
<p>For detailed explanation around interpreted and compiled languages, please refer to the earlier article &#8216;<a href="https://www.automationdojos.com/interpreted-vs-compiled-languages/" rel="noopener noreferrer" target="_blank">Interpreted Vs Compiled languages</a>&#8216;</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">VBScript Supports &#8216;Late Binding&#8217;</h3>
<p style="text-align: justify;">Since VBScript is a not a compiled language, hence natively it supports only &#8216;Late Binding&#8217;. Therefore unlike the &#8216;Early Binding&#8217; scenario, in case of VBScript being the &#8216;Late Binding&#8217; language, the binding does not occur until the program is actually executed.</p>
<p>In this scenario the program usually performs frequent registry or namespace lookups upon execution to access the information about the &#8216;COM Object&#8217;, consequently, any issues with the COM information are not discovered until actual execution. For further reading around this concept, please refer to dedicated article on &#8216;<a href="https://www.automationdojos.com/early-bound-vs-late-bound-binding/" rel="noopener noreferrer" target="_blank">Early Bound Vs Late Bound</a>&#8216;</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">Loosely Typed Language</h3>
<p style="text-align: justify;">When it comes to &#8216;Data Types&#8217;, VBScript is a &#8216;loosely typed language&#8217;. What this means is that the programmer does <span class="su-label su-label-type-default">not have to declare the &#8216;Data Type&#8217; of variables in advance</span>. Stating it the other way, VBScript does not provide any means for declaring the &#8216;Data Types&#8217; for the variables and rather uses a generic or universal data type called the &#8216;Variant&#8217; which can logically hold any type of value by means of its &#8216;Sub-Type&#8217;</p>
<p>Such a strategy of &#8216;having and not having data type&#8217; simultaneously is manifested by the concept of &#8216;Variant&#8217; and its &#8216;Sub-Type&#8217;. Summing-up this by means of a vague analogy, &#8220;all variables in VBScript have a default &#8216;data type called variant&#8217; which is equivalent of &#8216;no data type&#8217;, however, each variant has an associated &#8216;Sub-Type&#8217; which could be a string, integer, float&#8221; etc. Together they manifest the &#8216;having and not-having&#8217; strategy. More details around this have been discussed in the below section</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">Single and Universal Data Type</h3>
<p style="text-align: justify;">As discussed above, VBScript has only one Data Type which is called the &#8216;Variant&#8217;. This <span class="su-label su-label-type-default">&#8216;Variant&#8217; is a special type of data type </span>in the sense that it can logically hold almost any type of value e.g. String, Integer, Date, time etc. But this does not mean the VBScript is totally unaware about &#8216;Data Types&#8217;, in order to facilitate VBScript with the intelligence to recognize and deal with &#8216;Data Types&#8217; it has a <span class="su-label su-label-type-default">special feature known as the &#8216;SubType&#8217;</span>. This &#8216;SubType&#8217; is kind of &#8216;Data Type&#8217; of the &#8216;Variant&#8217; itself. For better understanding Imagine this :</p>
<p style="text-align: justify;">When you declare a variable it automatically gets the &#8216;Variant&#8217; data type assigned to it. But when you actually put some value in this variable then VBScript assigns the appropriate Sub Type (data type) for this value. You do have means to force the data types or query the data types from there onwards.</p>
<p>So in VBScript, you can solve the dilemma of Data Types by <span class="su-label su-label-type-default">asking the &#8216;Variant&#8217; that, what is it&#8217;s SubType</span>. Now, this might complicate things further hence we will leave it here on the worth mentioning note that &#8211; the &#8216;Variant&#8217; is the only data type supported by VBScript and hence it is the only data type returned by VBScript functions.</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">Object Model and Libraries</h3>
<p style="text-align: justify;">VBScript does not have any proprietary object model of its own! That is to say that if you want to access say for example &#8216;FileSystem&#8217; or &#8216;Network&#8217; objects and namespace, VBScript alone cannot help you. It has no way to directly talk to these resources.</p>
<p style="text-align: justify;">But the best part is, that it can hook to most of the <span class="su-label su-label-type-default">COM Components or Servers</span> and exploit them to get the work done. Hence whether you need to play with databases (ADO) or XMLs (DOM) or HTML (DOM) or any other supported COM stuff, it&#8217;s a piece of cake for VBS!</p>
<p style="text-align: justify;">Apart from being such a&nbsp; COM Master, it has got some very cool good friends from the same Microsoft family; namely the <span class="su-label su-label-type-default">&#8216;WSH&#8217;, &#8216;WMI&#8217; and &#8216;Scripting Runtime Library&#8217;</span>. You can literally get almost any scripting or automation task done on windows if you are able to make VBScript work together with these friends.</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">COM Enabled and COM Automation</h3>
<p style="text-align: justify;">On the last note, VBScript is a <span class="su-label su-label-type-default">fully &#8216;COM-Enabled&#8217; scripting language</span> and hence can very well work with a variety of COM Components / Servers. The worth mentioning point is that VBScript works only with the COM Objects which implement an <span class="su-label su-label-type-default">&#8216;IDispatch&#8217; interface</span>.</p>
<p style="text-align: justify;">Moreover, VBScript supports COM scripting which is to say that you can create your own &#8216;Custom Classes&#8217; and their methods and properties in VBScript. This gives you increased power while using VBScript. By coding &#8216;classes&#8217; you can make your code more robust, modular and reusable.</p>
</div>
<p><div class="su-spacer" style="height:5px"></div></p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/tutorials/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Tutorials&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/tutorials/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173&title=Tutorials" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Tutorials https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=173" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=173', 'Tutorials', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/vbs-part-2-concepts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>VBS Part 1 &#8211; Introduction and Background</title>
		<link>https://www.automationdojos.com/vbs-tutorial-part-1/</link>
					<comments>https://www.automationdojos.com/vbs-tutorial-part-1/#comments</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sat, 10 Nov 2012 11:09:33 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Tutorials]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=275</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>At the upfront, this theoretical article might look boring to most of us but still, it is advisable to know about our scripting friend before we start interacting and dealing with it. This is to provide a brief background of VBS, its purpose, origin etc., and if we don&#8217;t let go our patience it does [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p style="text-align: justify;">At the upfront, this theoretical article might look boring to most of us but still, it is advisable to know about our scripting friend before we start interacting and dealing with it. This is to provide a brief background of VBS, its purpose, origin etc., and if we don&#8217;t let go our patience it does turn out to be interesting! In this article, we would briefly discuss about &#8211; <span class="su-label su-label-type-default"> &#8216;Windows Script&#8217;, &#8216;Microsoft Visual Basic Family&#8217;, &#8216;VBScript&#8217; </span> background, history and versions.</p>
<p style="text-align: justify;">To start with, the commonly referred to as <a href="http://en.wikipedia.org/wiki/VB_Script" target="_blank" rel="noopener noreferrer">&#8216;VB Script&#8217;</a> was developed by <b>Microsoft</b> and hence officially known as&nbsp;the &#8216;<a href="http://en.wikipedia.org/wiki/VB_Script" target="_blank" rel="noopener noreferrer">Microsoft&#8217;s Visual Basic Scripting Edition</a>&#8216;. It is one of the important members of the &#8216;Windows Script Technology&#8217; which consists of a total of two members.</p>
<h3>Windows Script Technology</h3>
<p style="text-align: justify;">The &#8216;<a href="http://msdn.microsoft.com/en-us/library/d1et7k7c%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">Windows Script</a>&#8216; is the technology which is the backbone&nbsp;of scripting on Windows platform. It has been manifested as two <i>&#8216;Script Engines&#8217;</i>. Although it is not recommended because of the resulting complexity but these two scripting languages can be included in parallel within a single project and&nbsp;should work perfectly fine!</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">Windows Script Engines</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<div style="padding:3px 1px; margin: 5px 0px">
<ol style="text-align: justify;">
<li>Visual Basic Scripting Edition (VBScript)</li>
<li style="text-align: justify;">Microsoft JScript</li>
</ol>
</div>
<p></div></div></p>
<p style="text-align: justify;">Under this <b><i>&#8216;Windows Script</i>&#8216;</b> banner, Microsoft provides an array of supporting features and technologies which includes tools like &#8211; debuggers, script encoders besides the COM libraries and object models like &#8211; <span class="su-label su-label-type-default">Runtime Library</span> (scrrun.dll), WSH, WMI,&nbsp;ADSI, DOM&nbsp;and many more.</p>
<p><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig.jpg" alt="" width="657" height="350" class="aligncenter size-full wp-image-20039" srcset="https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig.jpg 657w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-300x160.jpg 300w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-150x80.jpg 150w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-200x107.jpg 200w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-400x213.jpg 400w" sizes="auto, (max-width: 657px) 100vw, 657px" /></p>
<p style="text-align: justify;">We will discuss more about &#8216;VBScript&#8217; in this article as well as in subsequent posts, but for <b>&#8216;JScript&#8217;</b> we will put an end by saying that it is&nbsp; Microsoft&#8217;s&nbsp;implementation of <b>&#8216;ECMA Scripting Standards and Specification</b>&#8216;. For reference the <b>Netscape&#8217;s</b> <b>&#8216;JavaScript&#8217;</b> as well is an implementation of the&nbsp;same ECMA specification and hence there is a common misconception that both JScript and JavaScript are same but officially it might be wrong to say that.</p>
<h3 style="text-align: justify;">The Microsoft VB Family</h3>
<p style="text-align: justify;">The &#8216;VBScript&#8217; belongs to the Microsoft VB family,&nbsp;more precisely it is a subset of the &#8216;<a href="http://en.wikipedia.org/wiki/Visual_Basic" target="_blank" rel="noopener noreferrer">Microsoft&#8217;s Visual Basic Language</a>&#8216;,&nbsp;this is quite obvious when we look at the similarties in the syntax of the both. The VB family comprises of three members &#8211;</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">VB Family Members</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<div style="padding:3px 1px; margin: 5px 0px">
<ol style="text-align: justify;">
<li>Visual Basic Language</li>
<li>Visual Basic for Applications (VBA) and</li>
<li>Visual Basic Scripting Edition (VBScript)</li>
</ol>
</div>
<p></div></div></p>
<p style="text-align: justify;">Unlike the rest of the two members, the <span class="su-label su-label-type-default">VBScript is typically a &#8216;<i>scripting language</i>&#8216;</span> hence it inherits all the features and constraints of a &#8216;scripting language&#8217;. Since the VB and VBA are not in-scope of this article hence rather than &#8216;muddying the water&#8217;, we would restrict ourselves to VBScript.&nbsp; As with any scripting language VBScript is &#8211;</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">Windows Script Engines</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<div style="padding:3px 1px; margin: 5px 0px">
<ol style="text-align: justify;">
<li>&#8216;<b><i>Interpreted</i></b> at Runtime&#8217;</li>
<li>Requires a <b>&#8216;<i>Host</i>&#8216;</b> to run on windows and</li>
<li>Does <b>not</b> support <b>&#8216;<i>Early Binding</i>&#8216;</b></li>
</ol>
</div>
<p></div></div></p>
<p style="text-align: justify;">Besides the above, it is a <span class="su-label su-label-type-default">&#8216;<i>Loosely Typed Language</i>&#8216;</span> which means it&nbsp;uses a &#8216;<i>universal data</i>&#8216; type (variant) and does not constraints the programmer to specify data types for variables while scripting. You can find more details and explanation on the above in related sections.</p>
<div class="rt-block">
<h3 style="text-align: justify;">History and Background</h3>
<p style="text-align: justify;">Historically, VBScript was probably first released (version 1.0) and shipped with Internet Explorer (MSIE 3.0) in 1996. It was intended to be used by&nbsp;web-developers to enhance their <span class="su-label su-label-type-default"><i>&#8216;client-side scripting&#8217;</i></span> capabilities.</p>
<p style="text-align: justify;">Nearly&nbsp;a year after, VBScript (version 2.0) was released with some added <span class="su-label su-label-type-default">&#8216;<i>server-side scripting&#8217;</i></span> capabilities for <i>Internet Information Server</i> (IIS) which was quite well leveraged with <i>ASP</i>. It was since then, that VBScript quickly claimed its right place. With this success, VBScript (version 3.0) was quickly&nbsp;introduced in Outlook 98 and for the first time appeared with &#8216;<i>Windows Script Host</i>&#8216; (WSH 1.0).</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<p style="text-align: justify;">Together with &nbsp;&#8216;<a href="http://msdn.microsoft.com/en-us/library/d1et7k7c%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">Windows Script Host</a>&#8216; <b>(WSH)</b> which supported any &#8216;<i>ActiveX Scripting</i>&#8216; languages, VBScript&nbsp;proved a &nbsp;boon to system administrators by providing the capability to manage and control system resources via VBScripts and other &#8216;<i>ActiveX scripting</i>&#8216; languages.</p>
<p></div></div></p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<p style="text-align: justify;">Besides all this, VBScript still lacked any native &#8216;<i>Object Model</i>&#8216; and hence&nbsp;soon after, it&nbsp;was&nbsp;supplemented with a &#8216;<i>Runtime Library</i>&#8216; providing some &#8216;<i>Object Model</i>&#8216;. This &#8216;<a href="http://msdn.microsoft.com/en-us/library/bstcxhf7%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">Script Runtime Library</a>&#8216; was implemented as &#8216;<b>scrrun.dll</b>&#8216; which primarily introduced &#8216;<i>Dictionary</i>&#8216; and &#8216;<i>Filesystem</i> (FSO) object models&#8217;.</p>
<p></div></div></p>
<p style="text-align: justify;">During the early launch days of VBScript, it had to face a tough competition with another scripting language that preceded it &#8211; &#8216;<i><a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank" rel="noopener noreferrer">JavaScript&#8217;</a></i>. Moreover unlike VBScript the &#8216;<i><a href="http://en.wikipedia.org/wiki/Netscape" target="_blank" rel="noopener noreferrer">Netscape&#8217;s</a></i>&#8216; support for &#8216;<i>JavaScript</i>&#8216; did boost&nbsp;the acceptance of &#8216;<i>JavaScript</i>&#8216; in the market rather then VBScript. But due to Microsoft&#8217;s committment towards VBScript and subsequent inclusion of VBScript in number of Microsoft products like &#8211; <i>IIS, Internet Explorer, Outlook</i> and <i>WSH</i> made VBScript to survive the competition till date.</p>
</div>
<h3 style="text-align: justify;">Latest and Significant Versions</h3>
<p style="text-align: justify;">Over the years because of Microsoft&#8217;s commitment to VBScript, there have been considerable releases of VBScript each of them adding more or less to it&#8217;s feature set. You can find detailed information about VBscript versions on this <a href="http://msdn.microsoft.com/en-us/library/4y5y7bh5%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">page on MSDN</a>.</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<p style="text-align: justify;">The <b>latest version</b> of VBScript available at the time of this article (Sept 2009)&nbsp;is VBScript <b>version 5.8</b> available with Internet Explorer v8. However if you ask me the most&nbsp;<b>significant release</b> still remains the VBScript <b>version 5.0</b>. Since it was this&nbsp;VBScript version 5.0 in which Microsoft introduced the &#8211; &#8216;<i>Class Objects&#8217;, &#8216;Class Statement&#8217;, &#8216;Property Let, Get and Set&#8217;, &#8216;Regular Expressions&#8217;, &#8216;Events&#8217;, Timer</i>&#8216;, etc.</p>
<p></div></div></p>
<div class="rt-block">
<h3 style="text-align: justify;">Applied VBScript (The Playground)</h3>
<p style="text-align: justify;">As described above VBScript was meant to be <b><i>&#8216;</i>client-side scripting</b>&#8216; language which holds true to the good extent till date besides its capabilities and usage in&nbsp;<i>&#8216;<b>server-side scripting</b>&#8216;</i> in conjunction with HTML, ASP or others. The &#8216;.HTC&#8217; files being the most basic example of webpage and VBScript collaboration.</p>
<p style="text-align: justify;">Apart from this web arena,&nbsp;VBScript is&nbsp;predominantly popular in <b>&#8216;system administration</b>&#8216; domain&nbsp;and of course proves as a&nbsp;good aid in related <b>&#8216;system side development&#8217;</b> wherein it fits very well along with <b><i>WSH, WMI, ADSI, ADO</i></b><i>&nbsp;</i>etc.</p>
<p style="text-align: justify;">Moreover,&nbsp;to add to its importance and usage &#8211; The latest&nbsp;playground is of course <b>HP&#8217;s &#8216;Quick Test Pro</b>&#8216; which has considerably raised the popularity of VBScript among the &#8216;Software Testing Community&#8217;.</p>
</div>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/tutorials/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Tutorials&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/tutorials/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275&title=Tutorials" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Tutorials https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=275" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=275', 'Tutorials', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/vbs-tutorial-part-1/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
