How to Capture ScreenShot of Particular Web-element using selenium aShot


Running Automation Script in Chrome Headless with TestNg

In this blog, we are going to learn, how we can capture the screenshot of particular WebElement using Third-party utility “aShot”.

aShot is third party web driver screenshot utility used for:

ร˜    Takes a screenshot of a WebElement on different platforms (i.e. desktop browsers, iOS Simulator Mobile Safari, Android Emulator Browser)
ร˜    Capturing Full Page Screenshots.
ร˜    Decorates screenshots
ร˜    Provides flexible screenshot comparison



Please Visit aShot official page for more details.

Below Steps, we need to follow to use aShot in our Project.

ร˜    Download aShot Jar or Maven dependency using this link.

The dependency that I am using for implementation.


ร˜    Please refer below code snippet where I have captured the screenshot of google logo from its web-page.

In the above code takeScreenshot captures the screenshot of given web element, Screenshot is the result of Screen capture.

After executing the above code result will looks something like:







SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
Anonymous
April 19, 2022 at 10:44 AM

How To Capture Screenshot Of Particular Web-Element Using Selenium Ashot - Qa Automation >>>>> Download Now

>>>>> Download Full

How To Capture Screenshot Of Particular Web-Element Using Selenium Ashot - Qa Automation >>>>> Download LINK

>>>>> Download Now

How To Capture Screenshot Of Particular Web-Element Using Selenium Ashot - Qa Automation >>>>> Download Full

>>>>> Download LINK 3Z

Reply
avatar