<?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>ShutterBug Archives | Selenium Webdriver Appium Complete Tutorial</title>
	<atom:link href="https://automationtesting.in/category/shutterbug/feed/" rel="self" type="application/rss+xml" />
	<link>https://automationtesting.in/category/shutterbug/</link>
	<description>Automation Testing</description>
	<lastBuildDate>Mon, 22 Oct 2018 13:25:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.2</generator>
	<item>
		<title>Image Comparison Using Selenium Shutterbug</title>
		<link>https://automationtesting.in/image-comparison-using-selenium-shutterbug/</link>
					<comments>https://automationtesting.in/image-comparison-using-selenium-shutterbug/#respond</comments>
		
		<dc:creator><![CDATA[Krishna Sakinala]]></dc:creator>
		<pubDate>Mon, 22 Oct 2018 13:25:39 +0000</pubDate>
				<category><![CDATA[ShutterBug]]></category>
		<category><![CDATA[image comparison]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[screenshot comparison]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[shutterbug]]></category>
		<category><![CDATA[Webdriver]]></category>
		<guid isPermaLink="false">http://automationtesting.in/?p=1903</guid>

					<description><![CDATA[<p>Image Comparison Using Selenium Shutterbug will discuss how we can compare 2 screenshots of a particular WebElement or particular web pages while working with selenium. Major Validations that we generally do in our day to day life is Text comparison in selenium. We always verify expected output value and mark our test cases pass or [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://automationtesting.in/image-comparison-using-selenium-shutterbug/">Image Comparison Using Selenium Shutterbug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p>Image Comparison Using Selenium Shutterbug will discuss how we can compare 2 screenshots of a particular WebElement or particular web pages while working with selenium.</p>
<div class="post-video"><iframe loading="lazy" title="Image Comparison Using Selenium Shutterbug in Selenium Webdriver" width="1165" height="874" src="https://www.youtube.com/embed/ftUaiXjLTc8?wmode=transparent&#038;fs=1"  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p>Major Validations that we generally do in our day to day life is Text comparison in selenium. We always verify expected output value and mark our test cases pass or fail. Let’s take a step forward and compare screens using selenium to make our automation scripts more robust. With ShutterBug we can compare screenshots in our runtime execution</p>
<p><a href="https://automationtesting.in/take-full-page-screenshot-using-shutterbug/">We recommend you to refer our previous blog for better understanding.</a></p>
<p><b>To start with it , Add below dependency to maven project  or Download jar files here.</b></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- https://mvnrepository.com/artifact/com.assertthat/selenium-shutterbug --&gt;
&lt;dependency&gt;
     &lt;groupId&gt;com.assertthat&lt;/groupId&gt;
     &lt;artifactId&gt;selenium-shutterbug&lt;/artifactId&gt;
     &lt;version&gt;${version}&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p><b>Lets Capture expected image first:</b></p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugExpectedScreenshot {

@Test
public void ExpectedScreenshotDesiredName()
{
      WebDriverManager.chromedriver().setup();
      WebDriver driver = new ChromeDriver();
      driver.get(&quot;https://automationtesting.in&quot;);
      Shutterbug.shootPage(driver,ScrollStrategy.BOTH_DIRECTIONS,500,true).withName(&quot;Expected&quot;).save();
      driver.quit();
  }
}
</pre>
<p>Above code will take full page screenshot and saves with name as “Expected”<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p><b>Screenshot Comparison:</b></p>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootPage(driver,ScrollStrategy.BOTH_DIRECTIONS,500,true). withName(&quot;&lt;desiredName&gt;&quot;).equals(&lt;ExpectedImage&gt;,&lt;Deviation Ratio&gt;);
</pre>
<p>In above syntax, shoot page is a method which captures screenshot by scrolling page for specific time. withName() method assigns desired name to screenshot take by shootpage() method. Equals method compares screenshots with deviation ratio.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugCompareScreenshot {

@Test
public void capturefullPageScreenshotwithDesiredName()
{
     WebDriverManager.chromedriver().setup();
     WebDriver driver = new ChromeDriver();
     driver.get(&quot;https://automationtesting.in&quot;);
     File image = new File(&quot;.\\screenshots\\Expected.png&quot;);
     BufferedImage expectedImage = ImageIO.read(image);
     boolean status = Shutterbug.shootPage(driver,ScrollStrategy.BOTH_DIRECTIONS,500,true).withName(&quot;Actual&quot;).equals(expectedImage,0.1);            	
     Assert.assertTrue(status);        	
     driver.quit();
  }
}
</pre>
<p>In above code we are buffering expected image using BufferedImage class and Then we are comparing with Actual screenshot taken using equals method in shutterbug. After that we are verifying test case with assert statement</p>
<p><b>Reference Link:</b></p>
<p>https://github.com/assertthat/selenium-shutterbug.</p>
<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<div id="themify_builder_content-1903" data-postid="1903" class="themify_builder_content themify_builder_content-1903 themify_builder themify_builder_front">

	</div>
<!-- /themify_builder_content --><p>The post <a rel="nofollow" href="https://automationtesting.in/image-comparison-using-selenium-shutterbug/">Image Comparison Using Selenium Shutterbug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://automationtesting.in/image-comparison-using-selenium-shutterbug/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Take Full Page Screenshot using Selenium ShutterBug</title>
		<link>https://automationtesting.in/take-full-page-screenshot-using-shutterbug/</link>
					<comments>https://automationtesting.in/take-full-page-screenshot-using-shutterbug/#respond</comments>
		
		<dc:creator><![CDATA[Krishna Sakinala]]></dc:creator>
		<pubDate>Mon, 22 Oct 2018 12:58:37 +0000</pubDate>
				<category><![CDATA[ShutterBug]]></category>
		<category><![CDATA[full page screenshot]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[shutterbug]]></category>
		<category><![CDATA[Webdriver]]></category>
		<guid isPermaLink="false">http://automationtesting.in/?p=1891</guid>

					<description><![CDATA[<p>How to Take Full Page Screenshot using Selenium ShutterBug will discuss how we can take a screenshot of a particular web page from top to bottom by scrolling till  the end of the page while working with selenium. There are many pages in our WWW(World Wide Web) which are longer than our screen size . [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://automationtesting.in/take-full-page-screenshot-using-shutterbug/">How to Take Full Page Screenshot using Selenium ShutterBug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle" style="display: block;" data-ad-client="ca-pub-9173866185064071" data-ad-slot="6638633547" data-ad-format="auto" data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p>How to Take Full Page Screenshot using Selenium ShutterBug will discuss how we can take a screenshot of a particular web page from top to bottom by scrolling till  the end of the page while working with selenium.</p>
<div class="post-video"><iframe loading="lazy" title="Take Full Page Screenshot using Selenium Shutterbug" width="1165" height="874" src="https://www.youtube.com/embed/-iMsww63i20?t=5s&#038;wmode=transparent&#038;fs=1"  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p>There are many pages in our WWW(World Wide Web) which are longer than our screen size . We have scroller to scroll down and see the content of web page. There will be few instances where you need to take screenshot of entire page during your automation tweaks. Using Selenium you can take screenshots for only visible content of page. There are different routes to capture full page screenshot using different jar files like Ashot(discussed in previous blog). Here is one more awesome and simple way to capture full page screenshot using Shutterbug. Let’s start looking into it.</p>
<p><a href="https://automationtesting.in/take-webelement-screenshot-using-shutterbug/">We recommend you to refer our previous blog for better understanding</a>.<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle" style="display: block;" data-ad-client="ca-pub-9173866185064071" data-ad-slot="6638633547" data-ad-format="auto" data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p><b>To start with it , Add below dependency to maven project  or Download jar files here.</b></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- https://mvnrepository.com/artifact/com.assertthat/selenium-shutterbug --&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.assertthat&lt;/groupId&gt;
    &lt;artifactId&gt;selenium-shutterbug&lt;/artifactId&gt;
    &lt;version&gt;${version}&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootPage(&lt;driver&gt;,&lt;scrollingstategy&gt;,&lt;time&gt;,true).withName(&lt;desiredName&gt;).save();
</pre>
<p>In above syntax, shoot page is a method which captures screenshot by scrolling page for specific time. withName method assigns desired name to screenshot take by shootpage method.Save method creates a folder with folder name as  &#8220;screenshots&#8221; and saves screenshot in that folder.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugFullPageScreenshot{

@Test
public void capturefullPageScreenshotwithDesiredName()
{
       WebDriverManager.chromedriver().setup();
       WebDriver driver = new ChromeDriver();
       driver.get(&quot;https://automationtesting.in&quot;);
       Shutterbug.shootPage(driver,ScrollStrategy.BOTH_DIRECTIONS,500,true).withName(&quot;FullPageScreenshot&quot;).save();
       driver.quit();
  }
}
</pre>
<p>&#8220;Shutterbug.shootPage(driver).withName(&#8220;automationtestingscreenshot&#8221;).save()&#8221;  will take full page screenshot and saves it with &#8220;FullPageScreenshot&#8221; name under screenshots folder.<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle" style="display: block;" data-ad-client="ca-pub-9173866185064071" data-ad-slot="6638633547" data-ad-format="auto" data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p><b>MonoChrome your Logo in your full page screenshot:</b></p>
<p>With Shutterbug you can monochrome desired elements in screenshot. Which makes  verification easy when you review your screenshots. Let&#8217;s go with it</p>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootPage(driver,ScrollStrategy.BOTH_DIRECTIONS,500,true).monochrome(&lt;element&gt;).withName(&quot;&lt;desiredName&gt;&quot;).save();
</pre>
<p>In above syntax, shoot page is a method which captures screenshot by scrolling page for specific time. withName method assigns desired name to screenshot take by shootpage method. Monochrome method will turn your webelement in Black &amp; White. Save method creates a folder with folder name as  &#8220;screenshots&#8221; and saves screenshot in that folder.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugFullPageScreenshotwithMonoChrome {

@Test
public void capturefullPageScreenshotwithDesiredName()
{
     WebDriverManager.chromedriver().setup();
     WebDriver driver = new ChromeDriver();
     driver.get(&quot;https://automationtesting.in&quot;);
     WebElement QuestionsLogo = driver.findElement(By.xpath(&quot;//img&#x5B;@alt='Interview Questions']&quot;));
     Shutterbug.shootPage(driver,ScrollStrategy.BOTH_DIRECTIONS,500,true).monochrome(QuestionsLogo).withName(&quot;FullPageScreenshotMonogram&quot;).save();
     driver.quit();
  }
}
</pre>
<p><b>Output Screenshot :</b></p>
<p><a href="https://automationtesting.in/wp-content/uploads/2018/10/monochorme-image.png"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-1895" src="https://automationtesting.in/wp-content/uploads/2018/10/monochorme-image.png" alt="full page screenshot" width="509" height="295" srcset="https://automationtesting.in/wp-content/uploads/2018/10/monochorme-image.png 509w, https://automationtesting.in/wp-content/uploads/2018/10/monochorme-image-300x174.png 300w" sizes="(max-width: 509px) 100vw, 509px" /></a></p>
<p><b>Reference Link:</b></p>
<p><a href="https://github.com/assertthat/selenium-shutterbug">https://github.com/assertthat/selenium-shutterbug</a><br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle" style="display: block;" data-ad-client="ca-pub-9173866185064071" data-ad-slot="6638633547" data-ad-format="auto" data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<div id="themify_builder_content-1891" data-postid="1891" class="themify_builder_content themify_builder_content-1891 themify_builder themify_builder_front">

	</div>
<!-- /themify_builder_content --><p>The post <a rel="nofollow" href="https://automationtesting.in/take-full-page-screenshot-using-shutterbug/">How to Take Full Page Screenshot using Selenium ShutterBug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://automationtesting.in/take-full-page-screenshot-using-shutterbug/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Take WebElement Screenshot using Selenium ShutterBug</title>
		<link>https://automationtesting.in/take-webelement-screenshot-using-shutterbug/</link>
					<comments>https://automationtesting.in/take-webelement-screenshot-using-shutterbug/#respond</comments>
		
		<dc:creator><![CDATA[Krishna Sakinala]]></dc:creator>
		<pubDate>Mon, 22 Oct 2018 12:30:11 +0000</pubDate>
				<category><![CDATA[ShutterBug]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[shutterbug]]></category>
		<category><![CDATA[Webdriver]]></category>
		<category><![CDATA[webelement screenshot]]></category>
		<guid isPermaLink="false">http://automationtesting.in/?p=1877</guid>

					<description><![CDATA[<p>How to Take WebElement Screenshot using Selenium ShutterBug will discuss how we can take a screenshot of a particular WebElement while working with selenium. In real time scenarios, Being  automated tester you will definitely come across a scenario to validate LOGO for your application. Of Course it can be done using human eyes. In lead [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://automationtesting.in/take-webelement-screenshot-using-shutterbug/">How to Take WebElement Screenshot using Selenium ShutterBug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle" style="display: block;" data-ad-client="ca-pub-9173866185064071" data-ad-slot="6638633547" data-ad-format="auto" data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
How to Take WebElement Screenshot using Selenium ShutterBug will discuss how we can take a screenshot of a particular WebElement while working with selenium.</p>
<div class="post-video"><iframe loading="lazy" title="Take WebElement Screenshot using Selenium Shutterbug" width="1165" height="874" src="https://www.youtube.com/embed/CIScJU3hvw0?t=82s&#038;wmode=transparent&#038;fs=1"  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p>In real time scenarios, Being  automated tester you will definitely come across a scenario to validate LOGO for your application. Of Course it can be done using human eyes. In lead of automation industry why we strain our eyes all the time. Selenium give ability to capture entire screenshot but not for a particular element. However, It can be achieved using ShutterBug. Lets automate this now using ShutterBug. Let&#8217;s take a step forward and take screenshot of LOGO(Particular Element) instead of taking whole page.</p>
<p><a href="https://automationtesting.in/take-screenshot-using-shutterbug/">We recommend you to refer our previous lecture for better understanding</a>.</p>
<p>Using ShutterBug, We can capture screenshot for particular element in a page. Lets learn in detail<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p><b>To start with it , Add below dependency to maven project  or Download jar files here.</b></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- https://mvnrepository.com/artifact/com.assertthat/selenium-shutterbug --&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.assertthat&lt;/groupId&gt;
    &lt;artifactId&gt;selenium-shutterbug&lt;/artifactId&gt;
    &lt;version&gt;${version}&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootElement(&lt;driver&gt;,&lt;Element&gt;).withName(&lt;desired name&gt;).save();
</pre>
<p>In above syntax, shoot element navigates driver focus to particular element. withName() method assigns desired name to screenshot take by shootElement() method.Save method creates a folder with folder name as  &#8220;screenshots&#8221; and saves screenshot in that folder.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugElemntscreenshot {

@Test
public void elementScreenshotwithDesiredName()
{
      WebDriverManager.chromedriver().setup();
      WebDriver driver = new ChromeDriver();
      driver.get(&quot;https://automationtesting.in&quot;);
      WebElement logo = driver.findElement(By.id(&quot;logo&quot;));
      Shutterbug.shootElement(driver,logo).withName(&quot;LogoElementScreenshot&quot;).save();
      driver.quit();
    }
}

</pre>
<p>&#8220;<strong>Shutterbug.shootElement(driver, logo).withName(&#8220;LogoElementScreenshot&#8221;).save()</strong>&#8221;  will take screenshot of logo element and saves it with &#8220;LogoElementScreenshot&#8221; name under screenshots folder.<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<p><b>Mark identified logo with Your Message:</b><b>         </b></p>
<p>Once logo is idenfied you can mark your logo with desired text and save them for your reference. For Example: Once you identify the logo on your screen you can mark it as “logo identified and Validated” and you can save that screenshot for your reference.</p>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootPage(&lt;driver&gt;).highlightWithText(&lt;Webelement&gt;,&lt;Message&gt;).save();
</pre>
<p>In above syntax, shoot page captures the screen. highlightWithText will highlight the element with message mentioned. Save method creates a folder with folder name as  &#8220;screenshots&#8221; and saves screenshot in that folder.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugElemntcreenshot {

@Test
public void highlightelementScreenshot ()
{
       WebDriverManager.chromedriver().setup();
       WebDriver driver = new ChromeDriver();
       driver.get(&quot;https://automationtesting.in&quot;);
       WebElement logo = driver.findElement(By.id(&quot;logo&quot;));
       Shutterbug.shootPage(driver).highlightWithText(logo, &quot;Logo identified &amp; Validated&quot;).save();
       driver.quit();
    }
}

</pre>
<p><strong>Output Screenshot :</strong><br />
<a href="https://automationtesting.in/wp-content/uploads/2018/10/ouput.png"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-1878" src="https://automationtesting.in/wp-content/uploads/2018/10/ouput.png" alt="webelement screenshot" width="396" height="253" srcset="https://automationtesting.in/wp-content/uploads/2018/10/ouput.png 396w, https://automationtesting.in/wp-content/uploads/2018/10/ouput-300x192.png 300w" sizes="(max-width: 396px) 100vw, 396px" /></a><br />
<b>Reference Link:</b></p>
<p><a>https://github.com/assertthat/selenium-shutterbug</a><br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<div id="themify_builder_content-1877" data-postid="1877" class="themify_builder_content themify_builder_content-1877 themify_builder themify_builder_front">

	</div>
<!-- /themify_builder_content --><p>The post <a rel="nofollow" href="https://automationtesting.in/take-webelement-screenshot-using-shutterbug/">How to Take WebElement Screenshot using Selenium ShutterBug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://automationtesting.in/take-webelement-screenshot-using-shutterbug/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Take Screenshot using Selenium ShutterBug</title>
		<link>https://automationtesting.in/take-screenshot-using-shutterbug/</link>
					<comments>https://automationtesting.in/take-screenshot-using-shutterbug/#respond</comments>
		
		<dc:creator><![CDATA[Krishna Sakinala]]></dc:creator>
		<pubDate>Mon, 22 Oct 2018 10:48:12 +0000</pubDate>
				<category><![CDATA[ShutterBug]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[shutterbug]]></category>
		<category><![CDATA[Webdriver]]></category>
		<category><![CDATA[webpage screenshot]]></category>
		<guid isPermaLink="false">http://automationtesting.in/?p=1853</guid>

					<description><![CDATA[<p>How to Take Screenshot using Selenium ShutterBug will discuss how we can take a screenshot of a particular website page when you work with selenium. Need of Screenshot for Automated Testing: From my own experience, getting screenshots from an automation framework whenever an automated test has problems or points of failure is a very helpful [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://automationtesting.in/take-screenshot-using-shutterbug/">How to Take Screenshot using Selenium ShutterBug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
How to Take Screenshot using Selenium ShutterBug will discuss how we can take a screenshot of a particular website page when you work with selenium.</p>
<p><b>Need of Screenshot for Automated Testing:</b></p>
<p>From my own experience, getting screenshots from an automation framework whenever an automated test has problems or points of failure is a very helpful feature. This ability can visually indicate a bug or malfunction in the application&#8217;s code, a problem in the design of the test, or other types of irregularities. Selenium&#8217;s API provides the necessary code for adding this capability. Along with that we have different third part API&#8217;s which supports screenshot feature in selenium. Out of those <a href="https://automationtesting.in/ashot/">Ashot</a> is one of the familiar way which we discussed earlier.</p>
<div class="post-video"><iframe loading="lazy" title="Take Screenshot using Selenium Shutterbug - Easy Way" width="1165" height="874" src="https://www.youtube.com/embed/Z01FMH5K2Ms?wmode=transparent&#038;fs=1"  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p><b>Why ShutterBug?</b></p>
<p>Here is one more pretty easy way to take screenshot using <b><i>ShutterBug</i></b>. Beauty for shutterbug is Ultimate. It can do many cool features like Taking screenshot for particular element, Comparing different screens in run time, Marking particular element during screenshot , Blurring the image.. etc . Let&#8217;s go in detail of each about shutterbug.</p>
<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
<b>To start with it , Add below dependency to maven project  or Download jar files here.</b></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- https://mvnrepository.com/artifact/com.assertthat/selenium-shutterbug --&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.assertthat&lt;/groupId&gt;
    &lt;artifactId&gt;selenium-shutterbug&lt;/artifactId&gt;
    &lt;version&gt;0.9&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootPage(&lt;driver&gt;).save();
</pre>
<p>In above syntax, shoot page is a method which captures the visible area on browser . Save method creates a folder with folder name as  &#8220;screenshots&#8221; in run time and saves screenshot with name as &#8220;date and timestamp&#8221; in png format.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugScreenshot {

@Test
public void takeScreenshot()
{
    WebDriverManager.chromedriver().setup();
    WebDriver driver = new ChromeDriver();
    driver.get(&quot;https://automationtesting.in&quot;);
    Shutterbug.shootPage(driver).save();
    driver.quit();
  }
}
</pre>
<p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script><br />
However, We can get screenshot with our desired name in shutterbug.</p>
<p><b>Syntax:</b></p>
<pre class="brush: plain; title: ; notranslate">
Shutterbug.shootPage(&lt;driverobject&gt;). withName(&lt;desiredname&gt;).save();
</pre>
<p>In above syntax, shoot page is a method which captures the visible area on browser . withName method assigns desired name to screenshot take by shootpage method.Save method creates a folder with folder name as  &#8220;screenshots&#8221; and saves screenshot in that folder.</p>
<p><b>Sample Code:</b></p>
<pre class="brush: java; title: ; notranslate">
public class ShutterbugScreenshotwithName {

@Test
public void takeScreenshotwithDesiredName()
{
      WebDriverManager.chromedriver().setup();
      WebDriver driver = new ChromeDriver();
            	
      driver.get(&quot;https://automationtesting.in&quot;);
      Shutterbug.shootPage(driver).withName(&quot;automationtestingscreenshot&quot;).save();
      driver.quit();
  }
}

</pre>
<p>&#8220;<strong>Shutterbug.shootPage(driver).withName(&#8220;automationtestingscreenshot&#8221;).save()</strong>&#8221; &#8212; will take screenshot and saves it with &#8220;automationtestingscreenshot&#8221; name.</p>
<p>We can do many more with shutterbug. Please go through our next blogs to learn more on Shutterbug.</p>
<p><b>Reference Link:</b></p>
<p><a href="https://github.com/assertthat/selenium-shutterbug">https://github.com/assertthat/selenium-shutterbug</a><br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br />
<!-- Responsive --><br />
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9173866185064071"
     data-ad-slot="6638633547"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins><br />
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<div id="themify_builder_content-1853" data-postid="1853" class="themify_builder_content themify_builder_content-1853 themify_builder themify_builder_front">

	</div>
<!-- /themify_builder_content --><p>The post <a rel="nofollow" href="https://automationtesting.in/take-screenshot-using-shutterbug/">How to Take Screenshot using Selenium ShutterBug</a> appeared first on <a rel="nofollow" href="https://automationtesting.in">Selenium Webdriver Appium Complete Tutorial</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://automationtesting.in/take-screenshot-using-shutterbug/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
