• tahseenat

Capturing Screenshot of a Webpage

Updated: Feb 19


Screenshot can be used for two purpose :

  1. To confirm the end result: We often need to verify the result obtained after each process and these screenshots can be helpful in a quick review of the test cases executed.

  2. Bug report: At times when the script doesn’t find the desired it reports a bug and for the reference, the screenshot of the page is required while logging the bug because it can be possible that the bug is raised because of the discrepancy in the script.

Taking a screenshot in Webdriver can be done in this way:


1. Type caste the Webdriver in the screenshot

Syntax:

TakesScreenshot screenshot =((TakesScreenshot)webdriver);


2. Call the getScreenshotAs function to create an image.

Syntax:

File file = screenshot.getScreenshotAs(OutputType.FILE);


3. Save the image to the desired location

Code



Wizdom QA has created an end to end course curriculum for the SDET profile. Our students will receive in-depth knowledge of the latest QA tools, techniques and programming languages.

As a registered student, you will learn Selenium WebDriver, Appium for Mobile App automation, API automation, CI/CD integration and many more.

We have studied the market carefully and understood that there is a huge demand for good SDET profiles, however, finding the right candidate is quite hard because of the lack of right skills and experience among job seekers.

 

Therefore we are here with 11+ years of hands-on and training 800+ students to experience to create one-stop-shop course content for Software Development Engineering in Test (SDETs).

Address

Belgard Square West, Tallaght,

Dublin, Ireland

Phone & WhatsApp

+353 894740999

Email

info@wizdomqa.com

support@wizdomqa.com

Additional Links

Wizdom QA Trainings | All rights reserved | 2019-20 ©

  • Facebook Social Icon