<?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>FT Automation | Automation Dojos</title>
	<atom:link href="https://www.automationdojos.com/category/test-automation/functional-test-automation/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.automationdojos.com/category/test-automation/functional-test-automation/</link>
	<description>Applied Automation Ops</description>
	<lastBuildDate>Sun, 26 Mar 2023 21:06:24 +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>FT Automation | Automation Dojos</title>
	<link>https://www.automationdojos.com/category/test-automation/functional-test-automation/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Find Broken Links with Selenium</title>
		<link>https://www.automationdojos.com/find-broken-links-with-selenium/</link>
					<comments>https://www.automationdojos.com/find-broken-links-with-selenium/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sat, 15 Aug 2020 13:52:00 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[How-To Selenium]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[broken-links]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[selenium-webdriver]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=22669</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/find-broken-links-with-selenium/">How To Find Broken Links 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/2020/08/post-selenium-brokenlink-fmg.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" fetchpriority="high" srcset="https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-fmg.png 575w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-fmg-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-fmg-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-fmg-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-fmg-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>What is a broken link? Links are used for navigating between webpages. Users are directed to a web page when they click or type a link on a web browser. So a broken link indicates a link that is not working. In other words, it will not navigate the user properly to the requested web [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/find-broken-links-with-selenium/">How To Find Broken Links 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/find-broken-links-with-selenium/">How To Find Broken Links with Selenium</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 wp-block-simpletoc-toc"><h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li><a href="#what-is-a-broken-link">What is a broken link?</a>

</li>
<li><a href="#reasons-for-broken-links">Reasons for broken links</a>

</li>
<li><a href="#why-should-you-check-broken-links">Why Should You Check Broken Links?</a>

</li>
<li><a href="#using-selenium-webdriver-to-find-broken-links">Using Selenium WebDriver to find broken links</a>


<ul><li>
<a href="#identification-and-validation-of-urls">Identification and Validation of URLs</a>

</li>
<li><a href="#http-request-sending">HTTP Request Sending</a>

</li>
<li><a href="#validating-links">Validating Links</a>
</li>
</ul>
</li></ul></div>

<h2 class="wp-block-heading" id="what-is-a-broken-link">What is a broken link?</h2>


<p>Links are used for navigating between webpages. Users are directed to a web page when they click or type a link on a web browser. So a broken link indicates a link that is not working. In other words, it will not navigate the user properly to the requested web page. It happens due to several reasons such as server-side errors, the absence of webpages, typing errors of users.</p>



<p>When a user visits a broken link, they are notified with an error message. While Valid URLs give 2XX status codes, broken URLs give status codes that begin with 400 series, and 500 series .4XX status codes indicate client-side errors, and 5XX status codes indicate server response errors.</p>


<h2 class="wp-block-heading" id="reasons-for-broken-links">Reasons for broken links</h2>


<p>Below are some reasons for broken links.</p>


<div class="su-list" style="margin-left:0px">
<ul>
<li><i class="sui sui-minus-circle" style="color:#da7f46"></i> 400 Bad request error: This error code is received because of the wrong URL address. So the server cannot process the link to get the requested web page.</li>
<li><i class="sui sui-minus-circle" style="color:#da7f46"></i> 404 Page Not Found error: The web page is not existing or removed by the owner.</li>
<li><i class="sui sui-minus-circle" style="color:#da7f46"></i> Sometimes the system firewall can restrict reaching some web sites.</li>
<li><i class="sui sui-minus-circle" style="color:#da7f46"></i> Users can insert the link incorrectly.</li>
</ul>
</div>


<h2 class="wp-block-heading" id="why-should-you-check-broken-links">Why Should You Check Broken Links?</h2>


<p>Having broken links on your website creates a bad experience for your users. It can seriously affect the reputation of your website. A website usually contains a large number of links. Manually testing each of these links is a time-consuming task. Therefore automating the Selenium Web Driver to check broken links is the best solution for this issue.</p>


<h2 class="wp-block-heading" id="using-selenium-webdriver-to-find-broken-links">Using Selenium WebDriver to find broken links</h2>


<p>Testing broken links can be done, as shown in the steps below. The below code is a sample code for a test carried out to <a href="https://www.google.co.uk">https://www.google.co.uk</a>, and relevant facts are discussed below.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">package automationproject;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.HttpURLConnection;
import java.util.Iterator;
import java.net.URL;
import java.util.List;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.ChromeDriver;
public class MyBrokenLinks {

  public static void main(String[] args) {

System.setProperty("webdriver.ie.driver","C:\\Users\\tushar\\eclipse-workspace\\first test\\chromedriver.exe");
    WebDriver mydriver = new ChromeDriver();
    String myhomePage = "https://www.google.co.uk";
    String myurl = "";
    HttpURLConnection myhuc = null;
    int responseCode = 200;
    mydriver = new ChromeDriver();
    mydriver.manage().window().maximize();
    mydriver.get(myhomePage);
    List &lt; WebElement > mylinks = mydriver.findElements(By.tagName("a"));
    Iterator &lt; WebElement > myit = mylinks.iterator();
    while (myit.hasNext()) {

      myurl = myit.next().getAttribute("href");
      System.out.println(myurl);
      if (myurl == null || myurl.isEmpty()) {
        System.out.println("Empty URL or an Unconfigured URL");
        continue;
      }

      if (!myurl.startsWith(myhomePage)) {
        System.out.println("This URL is from another domain");
        continue;
      }

      try {
        myhuc = (HttpURLConnection)(new URL(myurl).openConnection());
        myhuc.setRequestMethod("HEAD");
        myhuc.connect();
        responseCode = myhuc.getResponseCode();
        if (responseCode >= 400) {
          System.out.println(myurl + " This link is broken");
        }
        else {
          System.out.println(myurl + " This link is valid");
        }

      } catch(MalformedURLException ex) {
        ex.printStackTrace();
      } catch(IOException ex) {
        ex.printStackTrace();
      }
    }

    mydriver.quit();
  }
}
</pre>



<p>Below are my test results.</p>



<figure class="wp-block-image size-large is-style-default"><img decoding="async" width="802" height="641" src="https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1.png" alt="" class="wp-image-22672" srcset="https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1.png 802w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-300x240.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-768x614.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-150x120.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-696x556.png 696w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-525x420.png 525w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-200x160.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/08/post-selenium-brokenlink-1-400x320.png 400w" sizes="(max-width: 802px) 100vw, 802px" /></figure>



<p>Each link that is&nbsp; used in the codes of the web page can be found with the aid of the anchor tag‘&lt;a&gt;.’ The identified links are listed down</p>



<pre class="wp-block-code"><code>List&lt;WebElement&gt; mylinks = drive.findElements(By.tagName("a"));</code></pre>



<p>Then an iterator is placed to move through the created list of links.</p>



<pre class="wp-block-code"><code>Iterator&lt;WebElement&gt; myit = mylinks.iterator();</code></pre>



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


<h3 class="wp-block-heading" id="identification-and-validation-of-urls">Identification and Validation of URLs</h3>


<p>This step is provided to check the URLs generated with a third party domain or to check it is empty or null. HREF of the anchor tag is stored in a variable called “URL,” and then it is checked as above.</p>



<pre class="wp-block-code"><code>myurl = myit.next().getAttribute("href");</code></pre>



<p>For empty URLs, the below code is used.</p>



<pre class="wp-block-code"><code>if(myurl == null || myurl.isEmpty()){
    System.out.println("Empty URL or an Unconfigured URL");
    continue;
    }
    
</code></pre>



<p>The following code is used to determine where the URL belongs to, whether it belongs to the created domain or it is obtained from a third-party provider.</p>



<pre class="wp-block-code"><code>if(!myurl.startsWith(homePage)){
    System.out.println("This URL is from another domain");
    continue;
    }
</code></pre>



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


<h3 class="wp-block-heading" id="http-request-sending">HTTP Request Sending</h3>


<p>Methods in the above, imported “HttpURLConnection” class allows you to send requests and capture responses from the HTTP response codes.</p>



<pre class="wp-block-code"><code>myhuc = (HttpURLConnection)(new URL(myurl).openConnection());</code></pre>



<p>Here “HEAD” is set as request type without using&nbsp; “GET” to return only headers instead of the body of the document.</p>



<pre class="wp-block-code"><code>myhuc.setRequestMethod("HEAD");</code></pre>



<p>When the connect method is invoked, the actual connection of the URL will be established.</p>



<pre class="wp-block-code"><code>myhuc.connect();</code></pre>



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


<h3 class="wp-block-heading" id="validating-links">Validating Links</h3>


<p>HTTP response should be obtained by the getResponseCode() method.</p>



<pre class="wp-block-code"><code>responseCode = huc.getResponseCode();</code></pre>



<p>Broken links can be determined by the response code number, as mentioned above. Any code that is larger than or equal to 400&nbsp; can be identified as broken links.</p>



<pre class="wp-block-code"><code>if(responseCode &gt;= 400){
System.out.println(myurl+" This link is broken");
}
else{
System.out.println(myurl+" This link is valid");
}
</code></pre>



<p>Testing a broken link is a crucial function to make a good website with an excellent user experience. Users can identify malfunctioning links using Selenium Web Driver testing quickly. This is a tester-friendly version to create a better website.</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/category/test-automation/functional-test-automation/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%3D22669" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D22669" 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%3D22669" 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/category/test-automation/functional-test-automation/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%3D22669&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D22669" 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=22669" 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=22669', 'FT%20Automation', '' )"><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/find-broken-links-with-selenium/">How To Find Broken Links with Selenium</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/find-broken-links-with-selenium/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Desired Capabilities in Selenium Web Driver</title>
		<link>https://www.automationdojos.com/desired-capabilities-selenium-webdriver/</link>
					<comments>https://www.automationdojos.com/desired-capabilities-selenium-webdriver/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 18 Jun 2019 13:07: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[ChromeOptions]]></category>
		<category><![CDATA[DesiredCapability]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[selenium-desired-capability]]></category>
		<category><![CDATA[webdriver]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=22636</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/desired-capabilities-selenium-webdriver/">Desired Capabilities in Selenium Web Driver</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/2019/06/post-selenium-tutorial-fimag.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" srcset="https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag.png 575w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>1. Desired Capabilities in Selenium The performance of a Web application may vary according to different browsers and operating systems. Hence to ship out a near-consistent functional and performant application, it calls for testing your applications against different browsers or browser configurations. That is where Selenium&#8217;s &#8216;Desired Capabilities&#8217; class comes into the picture. &#8216;DesiredCapabilities&#8217; is [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/desired-capabilities-selenium-webdriver/">Desired Capabilities in Selenium Web Driver</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/desired-capabilities-selenium-webdriver/">Desired Capabilities in Selenium Web Driver</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/2019/06/post-selenium-tutorial-fimag.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag.png 575w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2019/06/post-selenium-tutorial-fimag-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></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-desired-capabilities-in-selenium">1. Desired Capabilities in Selenium</a>

</li>
<li><a href="#2-what-about-chromeoptions-class">2. What about ChromeOptions Class</a>

</li>
<li><a href="#3-when-and-where-to-use">3. When and Where to Use</a>

</li>
<li><a href="#4-available-capabilities-for-browser-types">4. Available Capabilities for Browser Types</a>


<ul><li>
<a href="#41-chromeoptions-for-chrome">4.1) ChromeOptions for Chrome</a>

</li>
<li><a href="#42-firefox-safari-edge-and-ie-options">4.2) Firefox, Safari, Edge and IE Options</a>

</li>
<li><a href="#43-desiredcapability-class-options">4.3) DesiredCapability Class Options</a>

</li>
</ul>
<li><a href="#5-desired-capabilities-methods-and-types">5. Desired Capabilities Methods and Types</a>

</li>
<li><a href="#6-usage-scenarios-for-desiredcapabilities">6. Usage Scenarios for DesiredCapabilities</a>


<ul><li>
<a href="#61-desiredcapabilities-example">6.1) DesiredCapabilities Example</a>


<ul><li>
<a href="#a-accept-ssl-certs">(a) Accept SSL Certs</a>

</li>
</ul>
<li><a href="#62-desiredcapabilities-with-chromeoptions">6.2) DesiredCapabilities with ChromeOptions</a>


<ul><li>
<a href="#a-start-chrome-maximized">(a) Start Chrome Maximized</a>

</li>
<li><a href="#b-disable-chrome-extensions">(b) Disable Chrome Extensions</a>

</li>
<li><a href="#c-start-chrome-incognito-mode">(c) Start Chrome Incognito Mode</a>

</li>
<li><a href="#d-enable-adblocker-in-chrome">(d) Enable Adblocker in Chrome</a>

</li>
</ul>
<li><a href="#63-desiredcapabilities-with-firefoxoptions">6.3) DesiredCapabilities with FirefoxOptions</a>


<ul><li>
<a href="#a-start-firefox-in-headless-mode">(a) Start Firefox in Headless Mode</a>

</li>
</ul>
<li><a href="#64-desiredcapabilities-with-internetexplorer">6.4) DesiredCapabilities with InternetExplorer</a>


<ul><li>
<a href="#a-enable-ie-for-ssl-and-check-focus">(a) Enable IE for SSL and Check Focus</a>

</li>
</ul>
</li>
</ul>
<li><a href="#conclusion">Conclusion</a>
</li></ul></div>

<h2 class="wp-block-heading" id="1-desired-capabilities-in-selenium">1. Desired Capabilities in Selenium</h2>


<p>The performance of a Web application may vary according to different browsers and operating systems. Hence to ship out a near-consistent functional and performant application, it calls for testing your applications against different browsers or browser configurations. That is where Selenium&#8217;s &#8216;Desired Capabilities&#8217; class comes into the picture.</p>



<p>&#8216;DesiredCapabilities&#8217; is a class in Selenium that can be used to define and set some generic capabilities or settings for browsers. The &#8216;Desired Capabilities&#8217; applies to WebDriver and is used to modify the properties of the web driver. </p>



<p>This class resides in the <span class="su-label su-label-type-default">org.openqa.selenium.remote.DesiredCapabilities</span> package. We use these desired capabilities as key or value pairs to set them for browsers. In this tutorial, we will discuss the &#8216;Desired Capabilities&#8217; feature in Selenium in detail.</p>



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


<h2 class="wp-block-heading" id="2-what-about-chromeoptions-class">2. What about ChromeOptions Class</h2>


<p>Chrome Options class provides methods for setting ChromeDriver-specific capabilities and hence can be used for manipulating various properties of the ChromeDriver. Similar to Chrome there are browser options classes available for <em>Firefox, Safari, Edge </em>and <em>Internet Explorer,</em> etc as well.</p>



<p>Given below is a simple example of ChromeOptions usage to give you an idea. The example below shows how to open the chrome browser in Maximize mode.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArgument("start-maximized");
ChromeDriver driver = new ChromeDriver(chromeOptions);
</pre>



<p>As you can see in the above example the <em>scope </em>of &#8216;ChromeOptions&#8217; applies to Chrome or Chrome Driver while the &#8216;Desired Capability&#8217; applies to WebDriver. This will get more clear with the below examples.</p>


<h2 class="wp-block-heading" id="3-when-and-where-to-use">3. When and Where to Use</h2>


<p>Generally, the ChromeOptions class and all such browser-specific classes (FirefoxOptions, Safari, Internet Explorer) are used in conjunction with &#8216;Desired Capabilities&#8217; for customizing the behavior of your Selenium WebDriver. </p>



<p>So you can set your browser-specific options using browser-specific classes such as ChromeOptions, FireFoxOptions, SafariOptions, etc. You can then pass on these objects to the DesiredCapabilities class object. So now your desired capability knows what you want for different types of browsers.</p>



<p>To further spice-up things you can use your prepared and customized &#8216;DesiredCapabilities&#8217; object in Selenium Grid targeting different machines or browsers. This may give you what we call a multi-browser test environment where the same test case needs to be executed on different browsers.</p>


<h2 class="wp-block-heading" id="4-available-capabilities-for-browser-types">4. Available Capabilities for Browser Types</h2>


<p>Chrome offers a long list of options to control the browser settings. You can find this whole list of switches <a href="https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/chrome/common/chrome_switches.cc" target="_blank" rel="noreferrer noopener">here</a>. Besides here are some most commonly used arguments for ChromeOptions class :</p>


<h3 class="wp-block-heading" id="41-chromeoptions-for-chrome">4.1) ChromeOptions for Chrome</h3>


<div class="su-list" style="margin-left:0px"><ul><li><i class="sui sui-cog" style="color:#777"></i> <strong>start-maximized</strong>: Used to open Chrome in maximize mode</li>   <li><i class="sui sui-cog" style="color:#777"></i> <strong>incognito</strong>: Used to open Chrome in incognito mode</li>   <li><i class="sui sui-cog" style="color:#777"></i> <strong>headless</strong>: Used to open Chrome in headless mode</li>   <li><i class="sui sui-cog" style="color:#777"></i> <strong>disable-extensions</strong>: Used to disable existing extensions on Chrome browser</li>   <li><i class="sui sui-cog" style="color:#777"></i> <strong>disable-popup-blocking</strong>: Used to disable pop-ups displayed on Chrome browser</li></ul></div>


<h3 class="wp-block-heading" id="42-firefox-safari-edge-and-ie-options">4.2) Firefox, Safari, Edge and IE Options</h3>


<p>Similarly, you can checkout browser options for other browsers like Safari, IE, Edge, Firefox, etc. on the following links:</p>



<figure class="wp-block-table is-style-regular"><table><tbody><tr><td><a href="https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions" target="_blank" rel="noreferrer noopener">Firefox</a></td><td><a href="https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/safari/SafariOptions.html" target="_blank" rel="noreferrer noopener">Safari</a></td></tr><tr><td><a href="https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/edge/EdgeDriver.html" target="_blank" rel="noreferrer noopener">Edge</a></td><td><a href="https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/ie/InternetExplorerOptions.html" target="_blank" rel="noreferrer noopener">Internet Explorer</a></td></tr></tbody></table></figure>


<h3 class="wp-block-heading" id="43-desiredcapability-class-options">4.3) DesiredCapability Class Options</h3>


<p>The Selenium WebDriver&#8217;s DesiredCapability class as well offers a long list of capabilities and options. Some of the most used common ones are:</p>



<div class="su-list" style="margin-left:0px"><ul><li><i class="sui sui-cog" style="color:#777"></i> <em>ACCEPT_SSL_CERTS</em>: This property tells the browser to accept SSL Certificates by default</li>   <li><i class="sui sui-cog" style="color:#777"></i> <em>PLATFORM_NAME</em>: This property is used to set the operating system platform used to access the web site</li>   <li><i class="sui sui-cog" style="color:#777"></i> <em>BROWSER_NAME</em>: This property is used to set the browser name for a web driver instance</li>   <li><i class="sui sui-cog" style="color:#777"></i> <em>VERSION</em>: This property to used to set the browser version</li></ul></div>



<p>Also, you can see the whole list of DesiredCapabilities options on <a href="https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities" target="_blank" rel="noreferrer noopener">this page on GitHub</a></p>


<h2 class="wp-block-heading" id="5-desired-capabilities-methods-and-types">5. Desired Capabilities Methods and Types</h2>


<p>Let&#8217;s look at the methods available with &#8216;Desired Capabilities&#8217; class. As mentioned &#8216;org.openqa.selenium.remote.DesiredCapabilities&#8217; is the package that has the class named DesiredCapabilities as a component. Selenium web drivers can change and set up properties for web browsers from their methods. Let’s discuss some commonly used methods in the DesiredCapabilities package.</p>



<div class="su-list" style="margin-left:0px"><ul><li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>getBrowserName()</strong> This method is used to get the name of the browsers.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>setBrowserName()</strong> This method is used to set the name of the browsers.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>getCapability()</strong> This method is used to obtain the capabilities of the using system.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>setCapability()</strong> This method can be used to give a name for the platform and device, version of the platform used, the absolute path, or the “.apk” of the user application under testing, application package, and application activity.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>getVersion()</strong> This method returns the version of the platform or browser.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>setVersion()</strong> The browser version and platform version can be set by this method.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>getplatform()</strong> This method returns information about the platform.</li>   <li><i class="sui sui-plus" style="color:#18a10e"></i> <strong>setPlatform()</strong> Platform information can be set by using this platform.</li></ul></div>


<h2 class="wp-block-heading" id="6-usage-scenarios-for-desiredcapabilities">6. Usage Scenarios for DesiredCapabilities</h2>


<p>Now, that you know the methods in DesiredCapabilities class, let’s see some of their common uses. First, let’s do an example using just the &#8216;DesiredCapabilities&#8217; class. </p>


<h3 class="wp-block-heading" id="61-desiredcapabilities-example">6.1) DesiredCapabilities Example</h3>


<p>The below example shows how Desired Capabilities enables chrome browsers to accept SSL certificates on websites. With Desired Capabilities, it is just three lines of code. You just have to use the “CapabilityType.ACCEPT_SSL_CERTS” with setCapabilities method. See the code below.</p>


<h4 class="wp-block-heading" id="a-accept-ssl-certs">(a) Accept SSL Certs</h4>


<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new ChromeDriver(capabilities);
</pre>



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


<h3 class="wp-block-heading" id="62-desiredcapabilities-with-chromeoptions">6.2) DesiredCapabilities with ChromeOptions</h3>


<p>ChromeOptions class is used to control the properties of the Chrome browser. The example below shows how to open the chrome browser in Maximize mode. </p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArgument("start-maximized");
ChromeDriver driver = new ChromeDriver(chromeOptions);
</pre>


<h4 class="wp-block-heading" id="a-start-chrome-maximized">(a) Start Chrome Maximized</h4>


<p>Now we can create a &#8216;Desire Capabilities&#8217; class object and pass the &#8216;options&#8217; we had set for our chrome object (which in this case is the (&#8216;start maximized). Once the &#8216;Desired Capability&#8217; object has received the options set for &#8216;chrome browser&#8217; in this case, then we can further create our &#8216;Web Driver&#8217; object using this &#8216;capability model&#8217; as parameter.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArgument("start-maximized");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
WebDriver driver=new ChromeDriver(capabilities);</pre>


<h4 class="wp-block-heading" id="b-disable-chrome-extensions">(b) Disable Chrome Extensions</h4>


<p>The following code disables extensions of Chrome which is particularly useful when you want to disable developer mode while testing.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArgument("--disable-extensions");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
WebDriver driver=new ChromeDriver(capabilities);</pre>


<h4 class="wp-block-heading" id="c-start-chrome-incognito-mode">(c) Start Chrome Incognito Mode</h4>


<p>Likewise, If you want to open the incognito window, use “&#8211;incognito” argument in the addArdument() method.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--incognito");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
WebDriver driver=new ChromeDriver(capabilities);
</pre>


<h4 class="wp-block-heading" id="d-enable-adblocker-in-chrome">(d) Enable Adblocker in Chrome</h4>


<p>Finally, let’s go for a more complicated one. You definitely need to enable an adblocker while testing through a browser. Enabling the adblocker has few steps. You have to download and extract the CRX file related to the Adblocker extension from <a href="http://crxextractor.com/">here</a>. Then you have to pass the path of the extracted file in the code. The following code will do the task.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addExtensions(new File("Path to CRX File"));
DesiredCapabilities caps = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
ChromeDriver chromeDriver = new ChromeDriver(caps);
</pre>



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


<h3 class="wp-block-heading" id="63-desiredcapabilities-with-firefoxoptions">6.3) DesiredCapabilities with FirefoxOptions</h3>


<p>Using Desired Capabilities with Firefox and IE is quite similar to how we do it with Chrome. So let’s do just one example from each of them. The following code lets you open Firefox in headless mode.</p>


<h4 class="wp-block-heading" id="a-start-firefox-in-headless-mode">(a) Start Firefox in Headless Mode</h4>


<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">DesiredCapabilities desiredCapabilities = DesiredCapabilities.firefox();
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setHeadless(headless);
desiredCapabilities.merge(firefoxOptions);
</pre>



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


<h3 class="wp-block-heading" id="64-desiredcapabilities-with-internetexplorer">6.4) DesiredCapabilities with InternetExplorer</h3>

<h4 class="wp-block-heading" id="a-enable-ie-for-ssl-and-check-focus">(a) Enable IE for SSL and Check Focus</h4>


<p>Similarly, You can check that if the Internet Explorer has the focus before you do start any interactions with it. The below code also force IE to accept SSL certificates.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">DesiredCapabilities desiredCapabilities = DesiredCapabilities.internetExplorer();
desiredCapabilities.setCapability("requireWindowFocus", true);
desiredCapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
</pre>



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


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


<p>Desired Capabilities are the beginning of advanced testing. It’s something really important to know if you are going to do anything more than basic testing. They provide so much functionality with so little code. Using them is pretty simple and quite similar across different uses. I hope you enjoyed our tutorial. Let’s meet again with another exciting tutorial.</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/category/test-automation/functional-test-automation/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%3D22636" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D22636" 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%3D22636" 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/category/test-automation/functional-test-automation/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%3D22636&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D22636" 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=22636" 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=22636', 'FT%20Automation', '' )"><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/desired-capabilities-selenium-webdriver/">Desired Capabilities in Selenium Web Driver</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/desired-capabilities-selenium-webdriver/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Use Mouse and Keyboard Events with Selenium</title>
		<link>https://www.automationdojos.com/mouse-and-keyboard-events-with-selenium/</link>
					<comments>https://www.automationdojos.com/mouse-and-keyboard-events-with-selenium/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Mon, 20 May 2019 01:26:00 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[How-To Selenium]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[selenium-keyboard]]></category>
		<category><![CDATA[selenium-mouse]]></category>
		<category><![CDATA[test-automation]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=21054</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/mouse-and-keyboard-events-with-selenium/">How To Use Mouse and Keyboard Events 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-selenium-mousekey-2.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-selenium-mousekey-2.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-selenium-mousekey-2-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-selenium-mousekey-2-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-selenium-mousekey-2-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-selenium-mousekey-2-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>In this tutorial, we will discuss how to use mouse click events and keyboard events with Selenium WebDriver. The mouse click and keyboard events are used to automate the interactions of a user with a mouse and keyboard. Action &#38; Actions We encourage the use of Action and Actions together with the keyboard and mouse [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/mouse-and-keyboard-events-with-selenium/">How To Use Mouse and Keyboard Events 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/mouse-and-keyboard-events-with-selenium/">How To Use Mouse and Keyboard Events with Selenium</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="#action-amp-actions">Action &amp; Actions</a>

</li>
<li><a href="#a-sample-program">A Sample Program</a>

</li>
<li><a href="#conclusion">Conclusion</a>
</li></ul>


<p>In this tutorial, we will discuss how to use mouse click events and keyboard events with Selenium WebDriver. The mouse click and keyboard events are used to automate the interactions of a user with a mouse and keyboard.</p>


<h2 class="wp-block-heading" id="action-amp-actions"><strong>Action &amp; Actions</strong></h2>


<p>We encourage the use of Action and Actions together with the keyboard and mouse events. Action &amp; Actions are user-facing APIs for emulating complex user gestures.</p>



<p><strong>Action </strong>is an interface that represents a single user interaction task. Generally,<em>build()</em> method generates a composite action by containing all the actions. On the other hand, <strong>Actions </strong>implement the builder pattern and it builds a Composite Action that contains all actions specified by method calls.</p>


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


<p>Let’s write a simple program explaining these concepts in detail. I’ll select the Facebook website as an example to describe both keyboard and mouse events.</p>



<p>Mouse click event will be triggered when we click the username field. Next, keyboard events will occur when we type the username and password in username and password fields. Again mouseclick event will be used to click on the “Login” button so that we can complete the Facebook login action.</p>



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


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



<p>The following image identifies the HTML elements that holds username, password, and log in button.</p>



<div><a href="https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2.png" class="td-modal-image"><figure class="wp-block-image size-large is-style-default td-img-style-shadow"><img loading="lazy" decoding="async" width="1008" height="363" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2.png" alt="" class="wp-image-21055" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2.png 1008w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2-300x108.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2-768x277.png 768w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2-150x54.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2-696x251.png 696w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2-200x72.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard2-400x144.png 400w" sizes="auto, (max-width: 1008px) 100vw, 1008px" /></figure></a></div>


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



<p>Accordingly, we can point to all three fields using the ID attribute. Now let&#8217;s open the Eclipse IDE and create a new class and name it as <strong>Facebook</strong>.</p>



<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_selenium-mousekeyboard3.png" alt="" class="wp-image-21057" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3.png 812w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-280x300.png 280w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-768x823.png 768w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-150x161.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-300x321.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-696x746.png 696w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-392x420.png 392w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-187x200.png 187w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_selenium-mousekeyboard3-373x400.png 373w" sizes="auto, (max-width: 812px) 100vw, 812px" /></figure>


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



<p>Let’s import the 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 org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
</pre>



<p>As usual, set the system property to the location of Chrome WebDriver and instantiate a WebDriver element from <em>org.openqa.selenium.</em></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="">System.setProperty("webdriver.chrome.driver", "D:\\Chromedriver\\chromedriver.exe"); 
WebDriver driver=new ChromeDriver();
</pre>



<p>Let&#8217;s assign the URL for Facebook to the WebDriver element.</p>



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



<p>Next, we will create three new web elements that point to the username, password, and login locations using their IDs.</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="">WebElement username = driver.findElement(By.id("email"));
WebElement password = driver.findElement(By.id("pass"));
WebElement loginButton = driver.findElement(By.id("loginbutton"));
</pre>



<p>Now, let&#8217;s move on to implementing the Action &amp; Actions. We will create a variable called <em>builder </em>from the <strong>Actions </strong>class. We will use <em>builder </em>to build a composite action that will contain all actions from the method call.</p>



<p>Furthermore, we will create a variable called <em>mouseOver </em>from the Action interface which needs to be used later to run the actions using the <em>build() </em>method.</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="">Actions builder = new Actions(driver);
Action mouseOver = builder
	.moveToElement(username)
	.click()
	.sendKeys(username, "techylosolutions@gmail.com")
	.sendKeys(username, Keys.TAB)
	.sendKeys(password, "This is my Password")
	.build();
</pre>



<p>According to the code above, the <em>moveToElement </em>method will go to the element where the ID is “<em>email” </em>(username box). Later, it will perform the <em>click</em> mouse event so that you can type the username.</p>



<p>Using the <em>sendKeys </em>keyboard event, we will parse the email as a username. Now let&#8217;s move to the password box. You can simply achieve this by pressing the <em>tab </em>key from the username box. We will use the same concept here as well. Using the <em>sendKeys </em>keyboard event, we will press the TAB button so that it moves to the next box.</p>



<p>Finally, we will type the password using the <em>sendKeys </em>keyboard event and compile all the actions with the <em>build()</em> method.</p>



<p>We can use the perform() methods to perform the actions which are mentioned below :</p>



<pre class="wp-block-code"><code>mouseOver.perform(); </code></pre>



<p>Type username and password into the necessary places then we need to click on the login button in order to complete the task. Once again, we will use the mouse <em>click </em>event for the <em>loginButton</em> variable.</p>



<pre class="wp-block-code"><code>loginButton.click();</code></pre>



<p>This method will simply find the ID ‘login button’. Click on top of it. You will see the next logged-in session on the Facebook site, after giving the correct username and password. Confirm the login By pressing the Login button and we can print the current URL of the page after the successful login.</p>



<pre class="wp-block-code"><code>System.out.println(driver.getCurrentUrl());</code></pre>



<p>That&#8217;s all with the demonstration. The entire program is as follows:</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 org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
public class Facebook {
public static void main(String[] args) {  	
         		System.setProperty("webdriver.chrome.driver", "D:\\chromedriver_win32\\chromedriver.exe"); 
		WebDriver driver = new ChromeDriver(); 
   		driver.get("https://www.facebook.com/");
         		WebElement username = driver.findElement(By.id("email"));
		WebElement password = driver.findElement(By.id("pass"));
		WebElement loginButton = driver.findElement(By.id("loginbutton"));
         		Actions builder = new Actions(driver);
         		Action mouseOver = builder
			.moveToElement(username)
			.click()
			.sendKeys(username, "This is my Username")
			.sendKeys(username, Keys.TAB)
			.sendKeys(password, "This is my Password")
			.build();
         		mouseOver.perform();  	
         	         	loginButton.click();
         		System.out.println(driver.getCurrentUrl());
   	} 
}
</pre>


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


<p>We hope this article helps to understand how mouse and keyboard events work. We hope you apply the same concepts to other webpages and come up with new ideas to automate the keyboard and mouse events 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/category/test-automation/functional-test-automation/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%3D21054" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21054" 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%3D21054" 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/category/test-automation/functional-test-automation/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%3D21054&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D21054" 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=21054" 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=21054', 'FT%20Automation', '' )"><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/mouse-and-keyboard-events-with-selenium/">How To Use Mouse and Keyboard Events with Selenium</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/mouse-and-keyboard-events-with-selenium/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Use TestNG with Selenium</title>
		<link>https://www.automationdojos.com/testng-with-selenium/</link>
					<comments>https://www.automationdojos.com/testng-with-selenium/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sat, 27 Apr 2019 17:35:10 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[How-To Selenium]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[result-reporting]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[test-ng]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=13376</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/testng-with-selenium/">How To Use TestNG 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-Selenium-TestNG.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post-Selenium-TestNG.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-Selenium-TestNG-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-Selenium-TestNG-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-Selenium-TestNG-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post-Selenium-TestNG-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>1. What is TestNG? TestNG is an open-source automated testing framework with flexible and powerful features. It is inspired by JUnit and NUnit but with some additional advantages and functionalities. TestNG gives the developers to build tests with easy annotations, sequencing, grouping, and parameterizing. The ability to generate test reports to get an idea on [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/testng-with-selenium/">How To Use TestNG 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/testng-with-selenium/">How To Use TestNG with Selenium</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="#1-what-is-testng">1. What is TestNG?</a>

</li>
<li><a href="#2-why-use-testng-with-selenium">2. Why use TestNG with Selenium?</a>

</li>
<li><a href="#3-installation-of-testng">3. Installation of TestNG</a>

</li>
<li><a href="#4-setting-up-a-testng-project">4. Setting up a TestNG Project</a>

</li>
<li><a href="#5-creating-a-testng-testfile">5. Creating a TestNG TestFile</a>

</li>
<li><a href="#6-run-test-case-and-generate-report">6. Run Test Case and Generate Report</a>

</li>
<li><a href="#7-asserts-in-testng">7. Asserts in TestNG</a>

</li>
<li><a href="#8-summary">8. Summary</a>
</li></ul>

<h2 class="wp-block-heading" id="1-what-is-testng">1. What is TestNG?</h2>


<p>TestNG is an open-source automated testing framework with flexible and powerful features. It is inspired by JUnit and NUnit but with some additional advantages and functionalities. TestNG gives the developers to build tests with easy annotations, sequencing, grouping, and parameterizing.</p>



<p>The ability to generate test reports to get an idea on what test cases passed, failed, and skipped makes it even stronger and a better choice for a test automation framework.</p>


<h2 class="wp-block-heading" id="2-why-use-testng-with-selenium">2. Why use TestNG with Selenium?</h2>


<p>Selenium does not come with test report generating options. The best thing we can do is printing the results to the console. But with TestNG, we can produce test results in a proper report format through which we can get an overall idea for better analysis. Besides this, there are many other additional advantages TestNG provides.</p>



<ul class="bullet-add wp-block-list"><li>Produces test reports in different formats with clear ides of what test passed, failed, and skipped.</li><li>The same test cases can be executed several times by just using a keyword.</li><li>Test cases can be prioritized and grouped and converted to a .xml file.</li><li>Test cases can be run in multiple browsers simultaneously.</li><li>Ability to integrate with tools like Maven and Jenkins.</li><li>Supports parallel testing and load testing.</li><li>Easy and understandable annotations like ‘@’</li><li>It provides the ability to parameterize data.</li></ul>


<h2 class="wp-block-heading" id="3-installation-of-testng">3. Installation of TestNG</h2>


<p>Installing TestNG to Eclipse is pretty easy since it comes as a plugin obtained from Eclipse Marketplace.</p>



<div class="su-list" style="margin-left:0px"><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> First, Eclipse IDE should be installed on your computer, and it can be downloaded from their website.</li></ul></p>



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Next, launch Eclipse and go to Help in the menubar and select Eclipse Marketplace.</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="709" height="429" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG2.png" alt="" class="wp-image-13386" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG2.png 709w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG2-300x182.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG2-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG2-200x121.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG2-400x242.png 400w" sizes="auto, (max-width: 709px) 100vw, 709px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Once it is clicked, the Eclipse Marketplace Modal will be displayed. Then you will have to type in “TestNG” and search for it. Once the result comes up, click Install.</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="777" height="268" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG3.png" alt="" class="wp-image-13387" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG3.png 777w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG3-300x103.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG3-768x265.png 768w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG3-200x69.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG3-400x138.png 400w" sizes="auto, (max-width: 777px) 100vw, 777px" /></figure>


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



</div>


<h2 class="wp-block-heading" id="4-setting-up-a-testng-project">4. Setting up a TestNG Project</h2>


<div class="su-list" style="margin-left:0px">



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Once it is installed, we can create a new Java project by clicking File > New> Project</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="529" height="114" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG4.png" alt="" class="wp-image-13388" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG4.png 529w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG4-300x65.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG4-200x43.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG4-400x86.png 400w" sizes="auto, (max-width: 529px) 100vw, 529px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Give the name “myTestNGProject” and click Finish</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="368" height="483" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG5.png" alt="" class="wp-image-13389" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG5.png 368w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG5-229x300.png 229w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG5-152x200.png 152w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG5-305x400.png 305w" sizes="auto, (max-width: 368px) 100vw, 368px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Next is to import the libraries into the project. Go to project properties > Java Build Path</li></ul></p>



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Under libraries tab select Add Libraries.</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="511" height="197" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG6.png" alt="" class="wp-image-13390" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG6.png 511w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG6-300x116.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG6-200x77.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG6-400x154.png 400w" sizes="auto, (max-width: 511px) 100vw, 511px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Then select TestNG and click Next, then Finish.</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="403" height="333" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG7.png" alt="" class="wp-image-13391" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG7.png 403w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG7-300x248.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG7-200x165.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG7-400x331.png 400w" sizes="auto, (max-width: 403px) 100vw, 403px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Next, add the Selenium jar files into the project the same way as above but select ‘Add External Jars’ under the library tab, and select the .lib files from the folder they are saved at. These library files can be downloaded here.</li></ul></p>



</div>


<h2 class="wp-block-heading" id="5-creating-a-testng-testfile">5. Creating a TestNG TestFile</h2>


<div class="su-list" style="margin-left:0px">



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Right-click on the “src” file of the project created earlier and select New >Other</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="616" height="413" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG8.png" alt="" class="wp-image-13377" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG8.png 616w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG8-300x201.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG8-200x134.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG8-400x268.png 400w" sizes="auto, (max-width: 616px) 100vw, 616px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Select the TestNG class under the TestNG folder and click Next.</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="429" height="409" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG9.png" alt="" class="wp-image-13378" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG9.png 429w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG9-300x286.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG9-200x191.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG9-400x381.png 400w" sizes="auto, (max-width: 429px) 100vw, 429px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Type in the following values in text boxes given and click Finish.</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="506" height="179" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG10.png" alt="" class="wp-image-13379" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG10.png 506w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG10-300x106.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG10-200x71.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG10-400x142.png 400w" sizes="auto, (max-width: 506px) 100vw, 506px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> Once it is done, a default template can be seen in our class created by TestNG</li></ul></p>


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



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="334" height="181" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG11.png" alt="" class="wp-image-13380" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG11.png 334w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG11-300x163.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG11-200x108.png 200w" sizes="auto, (max-width: 334px) 100vw, 334px" /></figure>


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



<p><ul><li><i class="sui sui-check-square-o" style="color:#0eab3c"></i> To create a test case, the following code will be used. The code below will fetch the site https://www.airbnb.com/, verify the title, print out the result, and close the browser.</li></ul></p>


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



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">package myTestNGPackage;

import org.testng.annotations.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;

public class myTestNGFile {
  
  public String baseUrl = "https://www.airbnb.com/";
  String driverPath = "C:\\geckodriver\\geckodriver.exe";
  public WebDriver driver ; 
  @Test
  public void f() {
     
     System.out.println("launching firefox browser"); 
      System.setProperty("webdriver.gecko.driver", driverPath);
      driver = new FirefoxDriver();
      driver.get(baseUrl);
      String expectedTitle = "Vacation Rentals, Homes, Experiences &amp; Places - Airbnb";
      String actualTitle = driver.getTitle();
      Assert.assertEquals(actualTitle, expectedTitle);
      driver.close();
  }
}</pre>



</div>


<h2 class="wp-block-heading" id="6-run-test-case-and-generate-report">6. Run Test Case and Generate Report</h2>


<div class="wp-block-image is-style-default"><figure class="aligncenter"><img loading="lazy" decoding="async" width="462" height="230" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG12.png" alt="" class="wp-image-13381" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG12.png 462w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG12-300x149.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG12-200x100.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG12-400x199.png 400w" sizes="auto, (max-width: 462px) 100vw, 462px" /></figure></div>



<div class="wp-block-image is-style-default"><figure class="aligncenter"><img loading="lazy" decoding="async" width="313" height="215" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG13.png" alt="" class="wp-image-13382" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG13.png 313w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG13-300x206.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG13-200x137.png 200w" sizes="auto, (max-width: 313px) 100vw, 313px" /></figure></div>



<p>Tests can be run the usual way we run a test in Eclipse, but there will be 2 reports. One in the console, which is text-based, and the other in the TestNG result window, which is graphical.<br></p>



<p>To create HTML reports, right-click on the project, and click Refresh. Then you can see a new folder called “test-output”. Expand it and view the files. There will be a file called index.html. Double click on it to view the report.</p>



<div class="wp-block-image is-style-default"><figure class="aligncenter"><img loading="lazy" decoding="async" width="267" height="326" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG14.png" alt="" class="wp-image-13383" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG14.png 267w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG14-246x300.png 246w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG14-164x200.png 164w" sizes="auto, (max-width: 267px) 100vw, 267px" /></figure></div>



<p>The report will open up in the default browser of Eclipse. It is a detailed view of the tests executed, their information, and test results.</p>



<div class="wp-block-image is-style-default"><figure class="aligncenter"><img loading="lazy" decoding="async" width="760" height="336" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG15.png" alt="" class="wp-image-13384" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG15.png 760w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG15-300x133.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG15-200x88.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_selenium-with-testNG15-400x177.png 400w" sizes="auto, (max-width: 760px) 100vw, 760px" /></figure></div>


<h2 class="wp-block-heading" id="7-asserts-in-testng">7. Asserts in TestNG</h2>


<p>Assertions are used to validate test scripts and show whether they have passed or failed. In the above example, we have used Assert.assertEqual(actual value, expected value). If the values do not match the assert with a throw, an exception and the test case will fail.</p>



<p>There are mainly two types of Assertions. One is Hard Assertions, which are default in TestNG and are used to stop a test immediately when an assertion fails. The second one is Soft Assertion, which is a custom assertion that is used when a test has to continue even when an assertion fails in the sequence.</p>


<h2 class="wp-block-heading" id="8-summary">8. Summary</h2>


<ul class="bullet-check wp-block-list"><li>TestNG is powerful and a flexible testing framework.</li><li>It is inspired by JUnit and NUnit but has better functionalities.</li><li>Using TestNG with Selenium provides many great advantages, including the ability to produce test reports with better visibility of what test cases passed, failed, or skipped.</li><li>To use TestNG in Selenium, we need to create a TestNG class and write the test script on it.</li><li>We use Assertions to verify the status of the test in the middle of the test run.</li><li>Once a test script runs in TestNG, it produces two outputs. One in the console and the other in the TestNG result window.</li><li>After running the test suite, we can obtain the test report in the form of a .html file.</li></ul>



<p></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/category/test-automation/functional-test-automation/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%3D13376" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13376" 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%3D13376" 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/category/test-automation/functional-test-automation/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%3D13376&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13376" 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=13376" 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=13376', 'FT%20Automation', '' )"><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/testng-with-selenium/">How To Use TestNG with Selenium</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/testng-with-selenium/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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" loading="lazy" 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="auto, (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>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>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>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 loading="lazy" 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="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>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 loading="lazy" 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="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>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>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>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>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-9d6595d7 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>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>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>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>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>The <em>findElement </em>and <em>findElements </em>methods can return the elements in the following ways:</p>



<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>



</div>



<p>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>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>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>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>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>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/category/test-automation/functional-test-automation/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=FT%20Automation&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/category/test-automation/functional-test-automation/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=FT%20Automation" 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=FT%20Automation 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', 'FT%20Automation', '' )"><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></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/category/test-automation/functional-test-automation/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=FT%20Automation&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/category/test-automation/functional-test-automation/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=FT%20Automation" 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=FT%20Automation 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', 'FT%20Automation', '' )"><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/category/test-automation/functional-test-automation/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=FT%20Automation&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/category/test-automation/functional-test-automation/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=FT%20Automation" 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=FT%20Automation 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', 'FT%20Automation', '' )"><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>Introducing Testing-as-a-Service (TaaS)</title>
		<link>https://www.automationdojos.com/introducing-testing-as-a-service/</link>
					<comments>https://www.automationdojos.com/introducing-testing-as-a-service/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Fri, 16 Sep 2016 14:37:12 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[TaaS]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=12334</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/introducing-testing-as-a-service/">Introducing Testing-as-a-Service (TaaS)</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_TaaS-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_TaaS-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_TaaS-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_TaaS-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_TaaS-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_TaaS-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_TaaS.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>The &#8216;Cloud Computing&#8217; technology has revolutionized the IT industry and it has something good to offer to the testing industry too. After Iaas, PaaS, and SaaS concepts, there is a new testing area called Testing as a Service (TaaS) that is making waves in recent times. Increasing IT costs, shrinking budgets and growing business demands [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/introducing-testing-as-a-service/">Introducing Testing-as-a-Service (TaaS)</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/introducing-testing-as-a-service/">Introducing Testing-as-a-Service (TaaS)</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="#testing-challenges-in-traditional-setup">Testing Challenges in Traditional Setup</a>

</li>
<li><a href="#cloud-testing">Cloud Testing</a>

</li>
<li><a href="#benefits-of-cloud-testing">Benefits of Cloud Testing</a>

</li>
<li><a href="#cloud-testing-providers">Cloud Testing Providers</a>
</li></ul>


<p>The &#8216;Cloud Computing&#8217; technology has revolutionized the IT industry and it has something good to offer to the testing industry too. After Iaas, PaaS, and SaaS concepts, there is a new testing area called Testing as a Service (TaaS) that is making waves in recent times. Increasing IT costs, shrinking budgets and growing business demands pose a great challenge for organizations. Testing as a Service or Cloud Testing answers these challenges by providing cost-effective test solutions built using cutting-edge technologies.</p>


<h2 class="wp-block-heading" id="testing-challenges-in-traditional-setup"><strong>Testing Challenges in Traditional Setup</strong></h2>


<p>The first and foremost challenge in today’s organizational setup is the limited budget for the testing team. With changing economic conditions and growing competition, companies have to optimize available resources to the fullest. Allocating separate budgets for testing projects is cumbersome. Moreover, there are strict deadlines that need to be met. Secondly, the testing team creates a large number of test cases that are mostly unused. At times, they are used only once. Thirdly, traditional testing procedures are restricted by geographical locations. Most importantly, there is rapid development in the testing tools segment. World-class testing tools that are engineered with cutting-edge technologies are implemented by large enterprises and small and medium businesses cannot afford to lay a hand on these tools. Cloud Testing offers the luxury of using these cutting-edge technologies at an affordable price. Moreover, TaaS brings greater levels of agility into workflow procedures while improving the performance of the system.</p>



<div class="wp-block-image is-style-default"><figure class="aligncenter"><img decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2015/03/POST-Testing-as-a-Service.png" alt=""/></figure></div>


<h2 class="wp-block-heading" id="cloud-testing"><strong>Cloud Testing</strong></h2>


<p>Cloud Testing is the new trend in the testing tools segment that uses the cloud environment to simulate real-time traffic. It uses different testing modules to gauge the performance of an application. With cloud-based services dominating the technology, there is a greater need for cloud-based testing.</p>


<h2 class="wp-block-heading" id="benefits-of-cloud-testing"><strong>Benefits of Cloud Testing</strong></h2>


<p>Testing as a Service is rapidly gaining momentum in recent times. The primal benefit of a cloud testing environment is the quick deployment of testing tools required for the project. Cloud Testing offers a wide range of testing tools that are built using cutting-edge technologies. Moreover, the testing environment is deployed within a quick time. The performance of the cloud-based testing tool is very good. By bringing agility into testing procedures, cloud testing tools reduce the time taken to identify non-critical defects as well as critical defects.</p>



<p>Most importantly, cloud testing allows businesses to leverage available resources to a maximum extent. You don’t have to invest in various testing modules that are not used most of the time. By paying only for the services used, businesses get the flexibility to optimize budgets and leverage resources. The downside of cloud testing is that it is not suited for some applications. However, the cloud testing environment is rapidly developing to provide a versatile range of services.</p>



<p>Cloud testing is again different from testing a cloud. While cloud testing is about testing an application in the cloud, testing the cloud deals with the evaluation of the cloud infrastructure, applications, and environments that are provided on demand. It is to make sure that the cloud infrastructure is performing according to its cloud computing business objectives.</p>


<h2 class="wp-block-heading" id="cloud-testing-providers"><strong>Cloud Testing Providers</strong></h2>


<p>While the cloud testing environment is still new, there are few providers that offer quality testing software. HP Load Runner is one of the leading providers of cloud testing tools. SOASTA, Advaltis, and Cloud Assault are among other contenders for this place.</p>



<p>The &#8216;Cloud&#8217; innovation is still on the move. Mobile TaaS is another cloud-based testing environment that is used to test mobile applications. With mobile applications created in great volumes, Mobile TaaS has much more to do in the coming days.</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/category/test-automation/functional-test-automation/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%3D12334" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D12334" 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%3D12334" 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/category/test-automation/functional-test-automation/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%3D12334&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D12334" 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=12334" 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=12334', 'FT%20Automation', '' )"><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/introducing-testing-as-a-service/">Introducing Testing-as-a-Service (TaaS)</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/introducing-testing-as-a-service/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Automation Tools Comparison (SilkTest vs QTP vs Selenium)</title>
		<link>https://www.automationdojos.com/test-automation-tools-comparison/</link>
					<comments>https://www.automationdojos.com/test-automation-tools-comparison/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 19 Apr 2016 23:56:18 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[QTP-UFT]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Silk Test]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[QTP]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[tool-comparison]]></category>
		<category><![CDATA[uft]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=13143</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/test-automation-tools-comparison/">Automation Tools Comparison (SilkTest vs QTP vs Selenium)</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_test-tool-comparison01-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_test-tool-comparison01-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison01-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison01-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison01-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison01-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison01.png 575w" sizes="auto, (max-width: 280px) 100vw, 280px" /></p>
<p>While manual testing and automated testing go hand in hand, one of the important benefits of automated testing is the assurance that the software is reliable even after updates. In addition, redundancy detection tests ensure that the integrity of the software is maintained while operational costs are optimized. The increasing usage of automation tools in [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/test-automation-tools-comparison/">Automation Tools Comparison (SilkTest vs QTP vs 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/test-automation-tools-comparison/">Automation Tools Comparison (SilkTest vs QTP vs Selenium)</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="#test-tool-comparison">Test Tool Comparison</a>

</li>
<li><a href="#quick-test-pro-qtp">Quick Test Pro (QTP)</a>

</li>
<li><a href="#silk-test">Silk Test</a>

</li>
<li><a href="#selenium">Selenium</a>

</li>
<li><a href="#1-features-comparison">(1) Features Comparison</a>

</li>
<li><a href="#2-usability-aspects-comparison">(2) Usability Aspects Comparison</a>

</li>
<li><a href="#3-comparison-of-debugging-features">(3) Comparison of Debugging Features</a>

</li>
<li><a href="#4-performance-comparison">(4) Performance Comparison</a>

</li>
<li><a href="#5-system-requirements-comparison">(5) System Requirements Comparison</a>

</li>
<li><a href="#6-technical-support-comparison">(6) Technical Support Comparison</a>

</li>
<li><a href="#7-customer-service-amp-pricing-comparison">(7) Customer Service &amp; Pricing Comparison</a>

</li>
<li><a href="#conclusion">Conclusion</a>
</li></ul>


<p>While manual testing and automated testing go hand in hand, one of the important benefits of automated testing is the assurance that the software is reliable even after updates.</p>



<p>In addition, redundancy detection tests ensure that the integrity of the software is maintained while operational costs are optimized.</p>



<p>The increasing usage of automation tools in recent times has brought in several products into the market, making it tough to choose the right product for your testing needs. </p>



<p>Here is an evaluation of three popular automation test tools.</p>


<h2 class="wp-block-heading" id="test-tool-comparison">Test Tool Comparison</h2>


<p>Here are the top three automated testing tools that are widely used by testers across the globe. For each of the tools chosen, aspects like the <em>history, striking features, performance</em>, and <em>target audience</em> are considered. In addition, these aspects are considered.</p>



<div class="wp-block-image rt-image is-style-default"><figure class="alignright is-resized"><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison3.png" alt="" width="363" height="180"/></figure></div>


<div class="su-list" style="margin-left:0px">
<ul style="font-size: 13px; line-height: 1.65em; overflow: hidden;">
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> Features</li>
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> Ease of use</li>
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> Integration with other tools</li>
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> Quality and Performance</li>
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> Customer support and service</li>
<li><i class="sui sui-hand-o-right" style="color:#46b80d"></i> Price</li>
</ul>
</div>


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


<h2 class="wp-block-heading" id="quick-test-pro-qtp">Quick Test Pro (QTP)</h2>


<p>Quick Test Pro or QTP is one of the top performers in the automated testing tool arena. With an easy-to-use interface, reliable performance, easy integration with other testing tools and support for .NET environment, QTP has become the leader in the functional and regression testing segment. For a quick history, QTP is a product of <em>Mercury Interactive</em> launched in 2002. In 2007, <em>Hewlett-Packard</em> took over the product to lead the testing tools segment.</p>



<p>QTP is an object-based tool that allows you to automate test operations based on utility, automation or test objects. By being a keyword-driven tool, QTP allows you to use keywords in the creation of test scripts. The tool supports <strong>desktop-based</strong> and <strong>web-based applications</strong> and<strong> not command-line interface</strong> ones. For programming purposes, Microsoft VB scripting is used and data-driven approaches use Excel. Here are some of the striking features of the tool.</p>


<div class="su-list" style="margin-left:0px">



<ul class="wp-block-list"><li><i class="sui sui-plus" style="color:#66b04b"></i> Simple and easy-to-use interface</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Microsoft VB scripting language that offers extensive functions and resources</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Novice users can easily create test cases</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Test run iterations are made easy</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Supports .NET environment and XML</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Easy integration with other testing tools</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Object identification mechanism is improved</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Report generation for quick analysis</li></ul>


</div>



<p></p>


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


<h2 class="wp-block-heading" id="silk-test">Silk Test</h2>


<p>For enterprise applications, one of the powerful automated functional and regression testing tool is Silk Test. It was originally designed by <em>Segue Software</em> which was later acquired by <em>Borland</em> and then by <em>Micro Focus International</em>. It supports <strong>Object-oriented programming</strong>, though partially. You will find objects, classes and inheritance concepts that are seen in <strong>C++</strong>. It distinguishes each window and control in an application and associated specific attributed to each control for effective object-oriented implementation. The bitmap tool helps the software to capture windows and controls. Using silk test, you can easily identify mouse movements, images on the UI and keystrokes.</p>



<div class="wp-block-image is-style-default"><figure class="alignleft is-resized"><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison2.png" alt="" width="333" height="343"/></figure></div>


<div class="su-list" style="margin-left:0px">



<ul class="wp-block-list"><li><i class="sui sui-plus" style="color:#66b04b"></i> Startup config settings are stored in partner.ini file. You can also reconfigure these settings from the options menu.</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Tests are terminated when an exception occurs</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Uses object-oriented implementation supporting classes and objects</li><li><i class="sui sui-plus" style="color:#66b04b"></i> A true hierarchy that is object-oriented</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Effective object recognition and verification mechanism</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Built-in functions available for SQL queries and data-driven testing</li><li><i class="sui sui-plus" style="color:#66b04b"></i> A built-in recovery system is available</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Uses 4test scripting language that is specific to a domain</li></ul>


</div>



<p></p>


<h2 class="wp-block-heading" id="selenium">Selenium</h2>


<p>Selenium is a popular open-source testing tool for web applications. Not only that, but you can also automate administrative tasks as well. The increasing popularity for Selenium is due to the fact that major browser vendors made selenium a native part of their browsers. Whether you want to distribute scripts across multiple environments or create quick bug reproduction scripts, Selenium has the right answer for you.</p>



<div class="wp-block-image is-style-default"><figure class="alignright is-resized"><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_test-tool-comparison1.png" alt="" width="350" height="330"/></figure></div>



<p>Selenium is a suite of software testing tools. In 2004, <strong>Jason Huggins</strong> was testing an internal application when he thought it was a good idea to create a JavaScript library that allows a tester to rerun scripts instead of manually running them on each browser. This is when Selenium got its life. Later, it underwent several updates to turn into a powerful web testing tool.</p>



<p>Here are some of the striking features of Selenium:</p>


<div class="su-list" style="margin-left:0px">



<ul class="wp-block-list"><li><i class="sui sui-plus" style="color:#66b04b"></i> Highly flexible</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Good for directed tests</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Easy to setup and use</li><li><i class="sui sui-plus" style="color:#66b04b"></i> An intuitive interface for unit tests</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Multiple languages supported</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Runs in multiple browsers and platforms</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Offers robust frameworks by integrating with other tools</li><li><i class="sui sui-plus" style="color:#66b04b"></i> Allows you to connect multiple grids and run parallel tests at the same time</li></ul>


</div>



<p></p>



<p>Here are some of the factors considered for the evaluation. The first one is the feature set offered by the tool:</p>


<h2 class="wp-block-heading" id="1-features-comparison">(1) Features Comparison</h2>

<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>Features</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Installation</td>
<td width="110">Required</td>
<td width="110">Required</td>
<td width="110">Required</td>
</tr>
<tr>
<td width="110">Knowledge of scripts</td>
<td width="110">To some extent. But you can read the QTP manual, run sample scripts to start using the tool</td>
<td width="110">Required to certain extent</td>
<td width="110">Coding knowledge is required. You need to know the technicalities of framework integration.</td>
</tr>
<tr>
<td width="110">Cloud-based</td>
<td width="110">No</td>
<td width="110">No</td>
<td width="110">No</td>
</tr>
<tr>
<td width="110">Test Termination</td>
<td width="110">Continues to check other conditions after an exception. Tests can be terminated using ExitTest</td>
<td width="110">Terminates on exceptions</td>
<td width="110">Continues to check other conditions after an exception. Tests can be paused at an exception by adding a plugin</td>
</tr>
<tr>
<td width="110">Add-ins and Extensions</td>
<td width="110">QTP creates test objects and Test object description to verify them on run-time. It uses Mandatory properties, Assistive properties and Ordinal Identifier to do so. You can conveniently use the Add-in manager to select the desired add-in.</td>
<td width="110">Supports classes and objects when optional extensions are enabled</td>
<td width="110">Selenium stores user extensions in separate files. Add-ins are available for Mozilla only</td>
</tr>
<tr>
<td width="110">Visual recorders</td>
<td width="110">Records different tasks like the creation of GUI maps for the complete application, data and object checks and capturing of user actions as well</td>
<td width="110">Available to identify objects and verify them. You can create test frames, capture user actions, inspect and verify windows, objects etc</td>
<td width="110">Does not have direct recording tool but you can use third party tools like Castro for Python and Monte Media Library for Javascripts</td>
</tr>
<tr>
<td width="110">Object Hierarchy</td>
<td width="110">Supports classes but does not support inheritance</td>
<td width="110">Truly supported</td>
<td width="110">Yes</td>
</tr>
<tr>
<td width="110">Object recognition and verification</td>
<td width="110">Yes, it uses GUI checkpoint recorders for validation of objects</td>
<td width="110">Uses a lookup table mechanism to distinguish objects</td>
<td width="110">Yes, uses DOM structure of HTML pages to recognize objects</td>
</tr>
<tr>
<td width="110">Scripting Language</td>
<td width="110">VB Script</td>
<td width="110">Powerful OOP language 4Test</td>
<td width="110">Selenese, a domain-specific scripting language that supports PHP, Perl, C#, Java, Ruby and Python</td>
</tr>
<tr>
<td width="110">Database testing</td>
<td width="110">Has visual recorders for database checkpoints. Can pass data values into test cases</td>
<td width="110">Offers built-in functions to facilitate SQL queries. Can pass data values into test cases</td>
<td width="110">You can use POI API to perform data driven testing. POI API can be configured through Eclipse</td>
</tr>
<tr>
<td width="110">Windows application support</td>
<td width="110">Yes</td>
<td width="110">Yes</td>
<td width="110">No</td>
</tr>
</tbody>
</table>
</div>


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


<h2 class="wp-block-heading" id="2-usability-aspects-comparison">(2) Usability Aspects Comparison</h2>


<p>The second important aspect to consider is the usability feature. It is important to check how easy it is to install and run the tool</p>


<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>Usability</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Installation</td>
<td width="110">Easy to install / Self-explanatory</td>
<td width="110">Easy but takes more time. You need to install IBM Installation manager as well</td>
<td width="110">It is a time consuming process for first time users and requires knowledge of the tool as well. You need to install the RC server and choose the programming project</td>
</tr>
<tr>
<td width="110">User-friendly interface</td>
<td width="110">Yes</td>
<td width="110">Yes</td>
<td width="110">No</td>
</tr>
<tr>
<td width="110">Automation Process</td>
<td width="110">Pretty straightforward.</td>
<td width="110">Not complex</td>
<td width="110">Complex procedures. You need to run multiple components and programs working together to get the required solution</td>
</tr>
<tr>
<td width="110">Help documentation</td>
<td width="110">Adequate</td>
<td width="110">Adequate</td>
<td width="110">Communities and forums</td>
</tr>
<tr>
<td width="110">Technical support</td>
<td width="110">Dedicated</td>
<td width="110">Dedicated</td>
<td width="110">No</td>
</tr>
</tbody>
</table>
</div>


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


<h2 class="wp-block-heading" id="3-comparison-of-debugging-features">(3) Comparison of Debugging Features</h2>


<p>As automated testing tools allow you to identify errors in the code, debugging is an important aspect that needs proper attention</p>


<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>Debugging</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Getting assistance during errors</td>
<td width="110">Supports visual debugger with required capabilities</td>
<td width="110">Supports visual debugger with required capabilities</td>
<td width="110">Difficult to some extent. Take significant time to identify failures. You have to write a code to capture screenshots or DOM structures</td>
</tr>
<tr>
<td width="110">Recording feature</td>
<td width="110">Built-in</td>
<td width="110">Built-in</td>
<td width="110">Available with Mozilla plugin</td>
</tr>
<tr>
<td width="110">Exception Handling</td>
<td width="110">Built-in</td>
<td width="110">Built-in</td>
<td width="110">Have to write a code</td>
</tr>
<tr>
<td width="110">Error messages</td>
<td width="110">Failure report of each test case is documented separately</td>
<td width="110">Failure report of all test cases is documented in a single file</td>
<td width="110">Not very easy. It reports failures in a log console with failed tests in red color. You have to create a code to capture screenshots to identify the reason of failure.</td>
</tr>
</tbody>
</table>
</div>


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


<h2 class="wp-block-heading" id="4-performance-comparison">(4) Performance Comparison</h2>


<p>Another important feature to look at is the performance of the tool when running multiple automated scripts.</p>


<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>Performance</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Script creation time</td>
<td width="110">Very less to create scripts but takes more time to run them</td>
<td width="110">Considerably less</td>
<td width="110">Requires more time and expertise to create scripts</td>
</tr>
<tr>
<td width="110">Test Progress</td>
<td width="110">HP QC is a comprehensive test management tool</td>
<td width="110">Using SilkOrganizer, you can effectively track and manage tests</td>
<td width="110">You can use Cucumber or other frameworks for test management tasks.</td>
</tr>
<tr>
<td width="110">Consistency</td>
<td width="110">Performs consistently</td>
<td width="110">Performs consistently</td>
<td width="110">Performs consistently</td>
</tr>
</tbody>
</table>
</div>


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


<h2 class="wp-block-heading" id="5-system-requirements-comparison">(5) System Requirements Comparison</h2>


<p>Another important aspect to look at is system requirements. Before purchasing an automated testing tool, you should know if it suits your office environment.</p>


<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>System specifications</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Hardware</td>
<td width="110">Pentium IV or higher ( 1 GHz and above)</p>
<p>1 GB RAM</p>
<p>1GB free space on the hard disk</p>
<p>Windows XP SP2 and above</td>
<td width="110">2 GHz Intel or AMD processor</p>
<p>2 GB RAM</p>
<p>2 GB free storage space</p>
<p>Windows XP SP3 and above</td>
<td width="110">Selenium requires more system resources</p>
<p>4 GB Memory</p>
<p>4 x Dual Core AMD Opteron</td>
</tr>
<tr>
<td width="110">Programming Languages</td>
<td width="110">VB Scripting language</td>
<td width="110">4Test, Silk4J, Silk4NET</td>
<td width="110">Selenese, a domain-specific scripting language that supports PHP, Perl, C#, Java, Ruby and Python</td>
</tr>
<tr>
<td width="110">Testing Interfaces</td>
<td width="110">GUI, Web-based</td>
<td width="110">&nbsp;GUI, web-based</td>
<td width="110">Web-based, GUI</td>
</tr>
</tbody>
</table>
</div>


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


<h2 class="wp-block-heading" id="6-technical-support-comparison">(6) Technical Support Comparison</h2>


<p>While choosing the right automation testing tool, it is important to check out how the tool supports different aspects</p>


<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>Support features</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Windows Applications</td>
<td width="110">Yes</td>
<td width="110">Yes</td>
<td width="110">No</td>
</tr>
<tr>
<td width="110">Browsers</td>
<td width="110">Google Chrome, IE</td>
<td width="110">IE</td>
<td width="110">Mozilla, Chrome, Internet Explorer, Opera, HtmlUnit</td>
</tr>
<tr>
<td width="110">Environment</td>
<td width="110">Windows</td>
<td width="110">Windows</td>
<td width="110">Solaris, Linux, Windows, OS X</td>
</tr>
<tr>
<td width="110">Mobile Support</td>
<td width="110">Supports phones and tablets but uses a different product called HP UFT mobile</td>
<td width="110">SilkMobile supports all types of smartphones</td>
<td width="110">Android, BlackBerry, iPad, iPhone</td>
</tr>
<tr>
<td width="110">Supported frameworks</td>
<td width="110">Integrates with HP Quality Center</td>
<td width="110">.NET Framework</td>
<td width="110">Supports multiple frameworks like Eclipse, Ant, Maven, Selenium, Jenkins, Hudson</td>
</tr>
<tr>
<td width="110">Image recognition</td>
<td width="110">Yes</td>
<td width="110">Yes</td>
<td width="110">Yes but requires expertise</td>
</tr>
<tr>
<td width="110">File Upload</td>
<td width="110">Supports uploading of all types of files</td>
<td width="110">Yes</td>
<td width="110">No option for file upload</td>
</tr>
<tr>
<td width="110">Dialog Boxes</td>
<td width="110">Supports all types of dialog boxes</td>
<td width="110">Supports dialog boxes</td>
<td width="110">To some extent</td>
</tr>
</tbody>
</table>
</div>


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


<h2 class="wp-block-heading" id="7-customer-service-amp-pricing-comparison">(7) Customer Service &amp; Pricing Comparison</h2>

<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="110"><strong>Support / Price</strong></td>
<td width="110"><strong>HP QTP</strong></td>
<td width="110"><strong>Silk Test</strong></td>
<td width="110"><strong>Selenium</strong></td>
</tr>
<tr>
<td width="110">Technical Support</td>
<td width="110">Dedicated HP Support</td>
<td width="110">Dedicated Micro Focus support</td>
<td width="110">As it is open-source, there is no dedicated support. However, you can check out various communities and get answers. For any new issues, you need to explore workaround options or wait till someone posts a resolution in the forum.</td>
</tr>
<tr>
<td width="110">Customer Service</td>
<td width="110">Excellent</td>
<td width="110">Good, but complaints are increasing</td>
<td width="110">Not available</td>
</tr>
<tr>
<td width="110">Price</td>
<td width="110">Expensive. You have to purchase license and spend money on upgrades as well.</td>
<td width="110">Expensive.</td>
<td width="110">Being an open-source, it is free to download and use.</td>
</tr>
</tbody>
</table>
</div>


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


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


<div class="wp-block-image is-style-default"><figure class="alignright is-resized"><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool2.png" alt="" width="288" height="173"/></figure></div>



<p>Choosing the right automation testing tool is a tough ask. QTP, Silk Test and Selenium are all popular and powerful automated testing tools. However, choosing the right tool for your testing tasks <strong><em>depends on your infrastructure, testing requirements and expertise coding knowledge</em></strong>.</p>



<p>For large enterprises that can afford to spend dollars, QTP or Silk Test is a good choice. Being a complete suite, it offers a quick and easy way to automate testing tasks. On the other hand, Selenium suits small and medium businesses wherein the tool comes for free. However, testers need to have sound knowledge of coding languages.</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/category/test-automation/functional-test-automation/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%3D13143" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13143" 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%3D13143" 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/category/test-automation/functional-test-automation/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%3D13143&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13143" 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=13143" 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=13143', 'FT%20Automation', '' )"><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/test-automation-tools-comparison/">Automation Tools Comparison (SilkTest vs QTP vs Selenium)</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/test-automation-tools-comparison/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Best Practices For Evaluating Automation Tool</title>
		<link>https://www.automationdojos.com/best-practices-evaluating-automation-tool/</link>
					<comments>https://www.automationdojos.com/best-practices-evaluating-automation-tool/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 16 Feb 2016 14:08:20 +0000</pubDate>
				<category><![CDATA[FT Automation]]></category>
		<category><![CDATA[NFT Automation]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[tool evaluation]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=13110</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/best-practices-evaluating-automation-tool/">Best Practices For Evaluating Automation Tool</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_choosing-automation-tool4-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_choosing-automation-tool4-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool4-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool4-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool4-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool4-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool4.png 575w" sizes="auto, (max-width: 280px) 100vw, 280px" /></p>
<p>With rapidly changing financial conditions, businesses face the tough challenge of optimizing resources to produce maximum results. Choosing the right automation tool for functional testing is one of the important tasks in doing so. The rising popularity and emerging technologies have brought in several testing tools into the market which makes it difficult for organizations [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/best-practices-evaluating-automation-tool/">Best Practices For Evaluating Automation Tool</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/best-practices-evaluating-automation-tool/">Best Practices For Evaluating Automation Tool</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p>With rapidly changing financial conditions, businesses face the tough challenge of optimizing resources to produce maximum results. Choosing the right automation tool for functional testing is one of the important tasks in doing so.</p>
<p>The rising popularity and emerging technologies have brought in several testing tools into the market which makes it difficult for organizations to identify the right one for their testing needs.</p>
<p>You have to compare different testing tools and apply the functionality to your business processes to gauge the performance of the tool. Here are certain best practices that need to be followed while evaluating automated testing tools.</p>
<h2>1. Feature set</h2>
<p>When looking at the tool, one of the important aspects is the feature set. The first benefit of automation is the ease and efficiency it offers for testing purposes. This is what allows you to run automated scripts on multiple codes while you perform other tasks as well.</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:#7c7c7c;border-top-left-radius:1px;border-top-right-radius:1px">Recording &amp; Playback</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p>Among the feature set, the first one to look at is the <strong>recording </strong>and <strong>playback </strong>feature. Without this feature, the automation tool is not complete. Again, you should check how well it supports low-level recording. The tool should effectively record keyboard clicks and mouse clicks and identify objects as well. When you playback the script, it should be easy to read and understand.</p>
<p></div></div><div class="su-spacer" style="height:5px"></div><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">Object Recognition, Verification and Repository</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"><span class="inset-right" style="width: 340px; margin-bottom: 1px; padding-bottom: 1px;"><img loading="lazy" decoding="async" class="alignright rt-image" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool1.png" alt="" width="340" height="205" /></span></p>
<p>Another important functionality required by an automated testing tool is the ability to <strong>recognize </strong>and <strong>validate</strong> objects while storing them in a repository. As you run multiple scripts, the tool identifies hundreds of objects, standard and custom ones. It should offer an effective mechanism to separately identify each object while associated object attributes as well.</p>
<p>Having a <strong>central repository</strong> is a desirable option. When you change the name of the object, would you be able to use the object without affecting any part of the application? So, the best thing is to check how the object name mapping system is designed for the tool.</p>
<p>Another desirable feature is image testing. The tool should recognize images and compare one with others. So, check if the tool supports Optical Character Recognition (OCR).</p>
<p></div></div> <div class="su-spacer" style="height:5px"></div> <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">Web Testing</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p>With the internet explosion storming the IT segment, it has become inevitable for every business to perform web testing at some point of time. While choosing the automated testing tool, there are certain areas to look at.</p>
<p>Does the tool support HTML tables, DOM structure, links and site maps? In addition, the tool should know whether a page is completely loaded, links are working and images are loaded correctly. In addition, web page objects needs to be identified. You would need to input and extract data on web pages as well. Moreover, the performance of the tool on different networks, platforms and environments requires a check.</p>
<p></div></div></p>
<p><div class="su-spacer" style="height:5px"></div></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">Environment support</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p style="margin-bottom: 15px;">While web testing is important, native application support is the basic requirement as well. The automation tool you choose should support your office environment. There are certain tools that work only with windows desktop environment while others support web testing only. For instance, does the tool support the latest Java update or .NET update?</p>
<p style="margin-bottom: 5px;">Here are certain supporting features that need your consideration</p>
<p><span class="inset-left" style="width: 305px;"><img loading="lazy" decoding="async" class="rt-image alignleft size-medium wp-image-13106" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool3.png" alt="" width="300" height="180" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool3.png 575w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool3-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool3-280x168.png 280w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool3-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool3-400x240.png 400w" sizes="auto, (max-width: 300px) 100vw, 300px" /></span></p>
<p style="margin-bottom: 5px;"><div class="su-list" style="margin-left:0px"></p>
<ul>
<li><i class="sui sui-plus" style="color:#68b63a"></i> Mobile Testing support</li>
<li><i class="sui sui-plus" style="color:#68b63a"></i> Windows Support</li>
<li><i class="sui sui-plus" style="color:#68b63a"></i> Supported browsers</li>
<li><i class="sui sui-plus" style="color:#68b63a"></i> Supported frameworks</li>
<li><i class="sui sui-plus" style="color:#68b63a"></i> File uploading options / Dialog-box options</li>
<li><i class="sui sui-plus" style="color:#68b63a"></i> Supported environments</li>
</ul>
<p></div></p>
<p>Depending on your testing requirements, you should choose one.</p>
<p></div></div></p>
<p><div class="su-spacer" style="height:5px"></div></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">Database Support</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p>With stringent database management policies imposed by governing authorities, storing business data has become a crucial aspect for businesses. While creating applications, you should be able to effectively store and retrieve data. As most database management systems use SQL for storing and retrieving data, the tool should support SQL or likewise <strong>data query language</strong>. In addition, protocols like<strong> ODBC, JDBC</strong> or equivalent are used to transfer data to and fro from the databases. This is another important consideration as well. At the same time, the application should be able to interact with <strong>spreadsheets</strong> and <strong>files</strong> to store and extract data. <em>So, the support for database functions is important as well.</em></p>
<p></div></div></p>
<p><div class="su-spacer" style="height:5px"></div></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">Failure Recovery</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p>The basic purpose of testing applications is to make them error-free and efficient. On doing so, you would encounter errors and failures. When you encounter one, how well does the automated tool handle the failure? Is it easy to build this into the code? So, check out how the tool identifies errors and handles them.</p>
<p></div></div></p>
<p><div class="su-spacer" style="height:5px"></div></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">Integration with other tools</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p>While performing functional testing, you might have to move between different test management tools. So, the question here is how well does the tool integrate with other testing frameworks? When integrating with other tools, how is the performance etc?</p>
<p></div></div></p>
<h2>2. Minimum functionality</h2>
<p>While having multiple features is always a great idea, it is of no use if the functionality of the tool is not up to the mark. There are certain basic functions that are performed on a regular basis and the automated tool should be able to produce high-quality results. Here are some of the minimum functionalities expected from an automated tool.</p>
<p><div class="su-list" style="margin-left:0px"></p>
<ul>
<li><i class="sui sui-check" style="color:#68b63a"></i> Are you able to launch the browser and load the requested URL?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> Is the tool able to validate images and text?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> How is the performance of the tool with respect to data driven testing?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> Are users able to login into the application?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> How easy is the navigation part?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> How effective is the Record &amp; Playback feature?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> Are you able to edit and re-run scripts?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> How effective is the error recovery option?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> What about Parameterization?</li>
<li><i class="sui sui-check" style="color:#68b63a"></i> Reports and analysis of test results</li>
</ul>
<p></div></p>
<p><img loading="lazy" decoding="async" class="size-full aligncenter rt-image wp-image-13113" style="margin-top: 10px; margin-bottom: 5px;" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_choosing-automation-tool5.png" alt="" width="545" height="335" /></p>
<p><div class="su-spacer" style="height:10px"></div></p>
<h2>3. Usability</h2>
<p>The third important aspect to look at is the Usability. Right from installing the product to using various functions, the tool should be easy to use. The installation should be simple and self-explanatory. And, check if coding knowledge is required to run scripts and how long does it take to run scripts. In addition, what does the tool offer for <strong>debugging </strong>tasks? Does the tool provide adequate <strong>documentation</strong> and support?</p>
<h2>4. Performance</h2>
<p>The performance of the automated tool while running multiple scripts is important as well. It is to be robust enough to support enterprise applications. Check how long it takes to create a script and what is the script running time. Moreover, does the tool offer test management tools to effectively track and monitor test progress? And another important consideration is the <strong>consistency of test results</strong>. The system requirements for the tool need to be considered as well.</p>
<h2> 5. Technical Support</h2>
<p>While the tool offers extensive features, there should be adequate help and support to resolve technical issues. Check out the support options offered by the tool. While some products offer dedicated support, open-source testing tools generally do not have one. They have large communities and forums wherein you can find resolutions to several issues. However, if you experience any new issue, you will have to create your own resolution or wait for someone to post one.</p>
<h2>6. Price</h2>
<p>Finally, the price is an important factor as well. Today, some of the leading automated testing tools available in the market are very expensive. At the same time, there are open-source testing tools that are free to download and use. However, it is not a good idea to directly look at the price.</p>
<p>If the tool is expensive, consider the sophistication offered by the tool.</p>
<p>Does it require knowledge and expertise of coding which in turn results in the recruitment of skilled testers? At the same time, if the testing is quick and effective, it improves the development cycle of the product and thereby increases your revenues</p>
<p>While considering the price, the total ROI needs to be calculated that includes the price, licensing, support and maintenance. There are times when staffing, testing time and complexity of testing impact the revenues of the company. So, consider all these factors.</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/category/test-automation/functional-test-automation/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%3D13110" 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=FT%20Automation&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13110" 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%3D13110" 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/category/test-automation/functional-test-automation/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%3D13110&title=FT%20Automation" 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=FT%20Automation https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D13110" 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=13110" 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=13110', 'FT%20Automation', '' )"><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/best-practices-evaluating-automation-tool/">Best Practices For Evaluating Automation Tool</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/best-practices-evaluating-automation-tool/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
