Selenium Interview Questions | PART-6 | Different ways to take screenshot | Tamil

  Рет қаралды 31,662

Learn Automation Online

Learn Automation Online

5 жыл бұрын

Taking screenshot is one of the very important things in selenium automation. Screenshot gives us a better understanding of where the issue has happened. Suppose if we are doing headless testing then screenshots are the only way of identifying the issue with related to UI. There are two ways where we can take a screenshot. One is TakesScreenShot Interface provided by Selenium itself. The problem with this built-in option is, it can take the snap on only a particular portion but not the entire screen. If there are any alerts present on the screen and if we want to take the screenshot then, TakesScreenshot is not suitable. We can use the Robot class's createScreenCapture method to capture the full-screen screenshot.
Steps to take Screenshot using TakesScreenshot interface:
----------------------------------------------------------------------------------------------
1. Using Selenium's TakesScreenshot
2. call GetScreenshotAs method and store it in a file
3. Create an image file in any location
4. copy the screenshot in destinationFile (image) file, using FileUtils.(commons-io) or we can use Selenium's FileHandler as well to copy the file.
Steps to take Screenshot using Robot class:
-----------------------------------------------------------------------
1) Create an object of Robot class.
2) Get the screen size and store.
3) Use the Rectangle class and pass the screen size.
4) Use createScreenCapture(rectangle) of Robot class and capture screenshot. (source)
5) Define destination path file for the screenshot.
6) Write temp file into the destination file. (ImageIO)
#Selenium #Java #InterviewQuestions #LearnAutomationOnline

Пікірлер: 67
@NIVASIT08
@NIVASIT08 2 жыл бұрын
Hi Arul, Thank you so much. You played a vital role to teaching this automation for easy understandable method. I have seen your videos. Your Live Example is fantabulous. Whenever we perform that method or try to put coding means that examples comes in mind for easy way of execution. Thanks a lot!!!
@geethafaith757
@geethafaith757 4 жыл бұрын
Thank You so much Brother for fantastic lecture in Tamil. PROUD OF YOU ANNA.
@monishra723
@monishra723 Жыл бұрын
Wowwww... detailed explanation Bro♥️ I have Learnt everything from the learn automation online Channel only bro...The way you brings up and conclude the concept is awesome..♥️ impressed and Knowledged ✨
@abishekhrajendhran8157
@abishekhrajendhran8157 Жыл бұрын
Hi sir! Always fantabulous! You've proved that teaching is also a skill. Everybody can't have the skill to teach even they did masters in selenium r who have the capacity to write 1000 lines of testscripts.... simply awesome man! Epitome of trainer. u r beyond my exclamatory marks.
@LearnAutomationOnline
@LearnAutomationOnline Жыл бұрын
🙂🙏
@abarnajayachandran1298
@abarnajayachandran1298 2 жыл бұрын
I have learned another way to screen shot by using Robot class.. Thanks for the Info
@kalaiselvichandrakasu2780
@kalaiselvichandrakasu2780 4 ай бұрын
Hi bro ,idha Mari easy ya irukum nu ninaikave illa .....thanks
@sasireka7974
@sasireka7974 4 жыл бұрын
Ur way of teaching is really good bro
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
Thanks sasi reka
@packiarajthusianthan5369
@packiarajthusianthan5369 4 жыл бұрын
Bro, your content is really super.. Here i have one doubt.. we can press PrintScreen button for full screen shot.. we really needed this?
@kesavinip772
@kesavinip772 2 жыл бұрын
Thank you Brother. Really great lecture.
@shivu2012
@shivu2012 Жыл бұрын
Love this tutorial Sir, Thanks a lot.
@mfgcc3725
@mfgcc3725 3 жыл бұрын
Thank you very much bro......! your video is amazing
@yamunapalani6568
@yamunapalani6568 3 жыл бұрын
Ji romba thanks ji... Your explanations are absolutely clear... I learnt automation only through your videos... And with your interview videos I cleared the interview... A great hatsoff to your videos and to you too☺☺☺😊
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
That's awesome Yamuna, if you don't mind, can u pls share the list of questions that you got, to my email arulprasath36@gmail.com . It will.be useful for other viewers.
@yamunapalani6568
@yamunapalani6568 3 жыл бұрын
I have sent the mail arul😀
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
Yep, just received. Thanks a lot Yamuna, for consolidating the questions.
@bavithrabalu7511
@bavithrabalu7511 2 жыл бұрын
@@yamunapalani6568 in which company you are working?
@tanyanivas9443
@tanyanivas9443 3 жыл бұрын
Arul you lectures are too good and wish they were in english since i can understand only a little bit tamil. I had gone through lot of blogs, channels, udemy courses but i find your lectures are more detail.
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
thanks a lot Tanya and sorry you couldn't make the most out of my videos due to language constraint. I believe, only the examples which am sharing will be difficult, but the coding part, even if there is no audio, you can grab I guess.
@tanyanivas9443
@tanyanivas9443 3 жыл бұрын
​@@LearnAutomationOnline Yes i could grasp the coding part and appreciate for the small details you are explaining in interview point of view.
@arunragavan442
@arunragavan442 4 жыл бұрын
great explanation bro tqu....!!!
@balajimageshvaran2772
@balajimageshvaran2772 3 жыл бұрын
Using dataprovider i am running 5 test cases at the end. I want to tak screenshots. But final screenshot only saving in location previous screenshots overridden....please help me bro
@ParthiPlays
@ParthiPlays 2 жыл бұрын
Hi na, robot class eclipse la entha suggestion num varala na..Error adikuthu
@indujakumarigcb6941
@indujakumarigcb6941 8 ай бұрын
one doubt about robot screenshots -webpage visible iruntha thaana robot screenshots work aagum .otherwise it is not working correcta sir.
@abubuckerm4934
@abubuckerm4934 2 жыл бұрын
bro how can we override the screenshot using diff way
@hemar1576
@hemar1576 Жыл бұрын
Thanks
@SiasaArts
@SiasaArts Жыл бұрын
Thanks bro
@annej4272
@annej4272 2 жыл бұрын
Sir.. your videos are too good! easy to understand... in case of doubts, to clarify how to contact you?
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
Pls check if your question has already been answered on the comments asked before. If not post your doubt on the comment
@annej4272
@annej4272 2 жыл бұрын
@@LearnAutomationOnline ok ji
@Yohesh_The_Traveler
@Yohesh_The_Traveler Жыл бұрын
Super
@priyadharshini-dy9mz
@priyadharshini-dy9mz 4 жыл бұрын
Hi na, i cannot see ImageIO class in my eclipse, is it related to java version!?
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
Which version of java are you using? It should be available in 8
@priyadharshini-dy9mz
@priyadharshini-dy9mz 4 жыл бұрын
@@LearnAutomationOnline yes na , i got it, i imported imageio import statement as you mentioned in another comment
@user-yu7kf5to6h
@user-yu7kf5to6h Жыл бұрын
Can you please make session for selenium using Python...
@Entertainment-dw2vb
@Entertainment-dw2vb 3 жыл бұрын
Is it possible to scroll down and take screen shot of pages?
@karthickgurunathan4972
@karthickgurunathan4972 2 жыл бұрын
f
@ABDURRAHMAN-rl8mh
@ABDURRAHMAN-rl8mh Жыл бұрын
How to download common -io , file utils
@TheMadhiarasan
@TheMadhiarasan 5 жыл бұрын
Hi Bro. I have one ques. I want to run multiple test case n I want to take screenshot too. So each cases I have to mention the name like D://sample.png
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
When do you want to take a screenshot, when the test case fails? Watch extent report video in my channel. Search for extent report in my channel search button. Not the KZbin search. To run multiple test cases, you have to know TestNG. If you're not familiar with it, watch the TestNG playlist.
@TheMadhiarasan
@TheMadhiarasan 5 жыл бұрын
@@LearnAutomationOnline extend report is not displayed anywhere. Yep I tried all the videos TestNg.Nw I m familiar in TestNg🙏🙏
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Extend report is only one video. If multiple videos only, I'm making it as playlist. Please search extend report, in my channel search. Not the KZbin search on top. This way you can find videos. Let me know if you don't find it. Wil share the link.
@TheMadhiarasan
@TheMadhiarasan 5 жыл бұрын
@@LearnAutomationOnline Ya Got it bro.U mentioned as Creating beautiful report using extent report. Thank u so much.🙏
@SantoshKumar-zc8gt
@SantoshKumar-zc8gt 2 жыл бұрын
bro if the interviewer asks can we get the full page screenshot by maximizing the window by using TakesScreenshot what to answer bro kindly reply
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
Even if you maximize, there’s no surety that it’s going to be full page screenshot. In the screenshot video I have explained one more way
@SantoshKumar-zc8gt
@SantoshKumar-zc8gt 2 жыл бұрын
@@LearnAutomationOnline ok bro thanks for your reply I got clear clarity
@thinakaranrajendran2666
@thinakaranrajendran2666 5 жыл бұрын
Can we use robot.keypress to get screen shot?
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
I have made a video on taking screenshot with robot class. This may help you. But if you are asking whether if we can take screenshots via pressing print screen button, it's complex. Robot class has a dedicated way to take screenshots. kzbin.info/www/bejne/q6q2mImri9GDoc0
@thinakaranrajendran2666
@thinakaranrajendran2666 5 жыл бұрын
Thanks for clarifying me..
@rosyantony9099
@rosyantony9099 5 жыл бұрын
Hi sir, I am not getting 'ImageIO' class, which jar file should I download for it...Please help me on it
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Try to add this import statement. import javax.imageio.ImageIO; and let me know if this works
@rosyantony9099
@rosyantony9099 5 жыл бұрын
@@LearnAutomationOnline Sir after adding import statement am getting this message "Access restriction: The method 'ImageIO.write(RenderedImage, String, File)' is not API (restriction on required library 'C:\Program Files\Oracle\OpenJDK 10.0.1\lib\jrt-fs.jar')"
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Go to buildpath - configure buildpath, Remove the jre system library and add it again. After that restart the Eclipse. It will work. Of not please let me know.
@rosyantony9099
@rosyantony9099 5 жыл бұрын
@@LearnAutomationOnline As you mentioned I followed all,but still getting same error
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
@@rosyantony9099 In your Eclipse, go to Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning. If this is also, not working we have to select alternate JDK. try this once and let me know
@priyapraki4656
@priyapraki4656 2 жыл бұрын
Hi sir, plz make a videos to automate otp .......
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
OTP is not a suitable candidate for automation. While in testing stage, you will disable the otp and test it.
@priyapraki4656
@priyapraki4656 2 жыл бұрын
@@LearnAutomationOnline tq sir....en frd Ku oru interview la intha question ketanga..tq for ur quick reply
@gayukumar9280
@gayukumar9280 5 жыл бұрын
how to do this with python?
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Python has built in methods to take screenshot. We don't have to use selenium. Python itself is having options. Screenshot I think the method name.
@deepavinoth9207
@deepavinoth9207 Жыл бұрын
E̊t̊h̊ů k̊o̊n̊j̊åm̊ k̊ås̊t̊åm̊åå e̊r̊ůk̊ů b̊r̊o̊😂
@deepavinoth9207
@deepavinoth9207 Жыл бұрын
Ůs̊i̊n̊g̊ r̊o̊b̊e̊r̊t̊ c̊l̊ås̊s̊ i̊s̊ d̊i̊f̊f̊i̊c̊ůl̊t̊
@LearnAutomationOnline
@LearnAutomationOnline Жыл бұрын
Yeah. But therinji vachikonga pothum
Selenium Interview Questions | PART-1 | Implicit Wait Explained in Depth | Tamil
22:43
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 3,6 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 166 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 59 МЛН
How to take Screenshot in Selenium || Interview Question
13:37
Naveen AutomationLabs
Рет қаралды 93 М.
P26 - Capture screenshots for only failed tests in TestNG | TestNG |
47:47
SDET Automation Mock Interview - 8+ YOE (Selenium, Java, API, Testing)
1:37:32
Naveen AutomationLabs
Рет қаралды 258 М.
Selenium Interview Questions | PART-3 | Fluent Wait Explained in Depth | Tamil
20:37
How To Explain Selenium Automation Framework In Interviews
12:03
RD Automation Learning
Рет қаралды 188 М.
Creating beautiful reports using Extent Report for Selenium Test cases | Tamil
35:56
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 3,6 МЛН