Selenium Framework - Part 35 - Creating your own Exception

  Рет қаралды 5,495

Testing Mini Bytes

Testing Mini Bytes

Күн бұрын

Пікірлер: 42
@manikannanmarimuthu9232
@manikannanmarimuthu9232 3 жыл бұрын
Finaly understood about to create customize exception. Thanks for sharing some amazing stuff.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Thanks a lot nanba. Katrathu kai alavu. Keep Learning. ✌️
@supriyassampath1419
@supriyassampath1419 3 жыл бұрын
Amazing industry standard framework explanation. I would recommend everyone who wants to learn industry level framework standard they will find it here. This has helped me a lot Amuthan.i have not seen anywhere who has explained exception handling so crisp and clear, even paid videos. I have a question Inside catch block can I use Log.error(" some error message" And Throw new runtime exception ("some error message")
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Why do you want to log it there.? What is thr purpose of it.? Instead pass it to the runtime exception. It ll take care of logging
@supriyassampath1419
@supriyassampath1419 3 жыл бұрын
@@TestingMiniBytes thank you. Yes, runtime exception will serve the purpose of displaying the message.
@skaLife
@skaLife 2 жыл бұрын
I totally agree and acknowledge - "i have not seen anywhere who has explained exception handling so crisp and clear, even paid videos." - @Supriya This is an ultimate playlist totally for absolutely FREE. Until and unless you spent so many hours rectifying the issues, that you face while working with Exception Handling, and thereby learn from them, it will be tough to understand the knowledge. @Amuthan has compiled all those Exception Handing points into a 2 hours video. Thanks very much Amuthan.
@jaysree3678
@jaysree3678 3 жыл бұрын
Able to understand core JAva concepts much better through your videos.
@lka5968
@lka5968 3 жыл бұрын
Another great video Amuthan.Thank you.
@vinothkumars4333
@vinothkumars4333 3 жыл бұрын
Great explanation bro
@subhadeepchakraborty4236
@subhadeepchakraborty4236 3 жыл бұрын
This is great work Amuthan!! Please keep coming up with such kind of contents. Big fan of your channel 🙌🙌🙌
@jaykavin2215
@jaykavin2215 3 жыл бұрын
Amazing content 👏👏👏
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Thanks Jay 👏🙏
@askomdch
@askomdch 3 жыл бұрын
Do this in your catch block and you will have printed the complete stacktrace in your runtime exception. This will give you the exact line of code in the method that caused the exception. StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); throw new runtimeException(sw.toString());
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Yes Om. But here i thought of enriching the exception. I just tried it on the fly lol. Most of the time, we are not actually interested in top level logging. We can even remove certain stack trace elements and just print what is actually needed. Anyway thanks a lot for your feedback. 👍
@manoharch1203
@manoharch1203 3 жыл бұрын
HI Amuthan, Can you please create one video on where we have used/Implemented it in your framework. Thanks :)
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Please watch the next parts of the video so that you can understand how to use in the framework
@shrutimendiratta7785
@shrutimendiratta7785 2 жыл бұрын
How to handle situation where we get NosuchElementException from selenium but the actual root cause is button has not been clicked due to some reasons and failed to land to next page to check visibility of another element. Here when the element(button) has not been clicked the program should terminate there itself with throwing exception that element has not been clicked.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
Please ask your questions in the telegram group with the code, screenshot and error message. Thanks.
@ajitcs2937
@ajitcs2937 4 ай бұрын
hey @TestingMiniBytes although concept is very good i encountered a problem i made the runtime exception for config file key value not prsent that eg url but when i run i saw browser opening and then nothing happened prog got terminated due to our custom runtime exception but browser didnt close beacuse abrupt termination
@kranthikumarkatta9588
@kranthikumarkatta9588 3 жыл бұрын
Hi , you said you gonna make a separate video on hard coding ofTRY AND CATCH OF which MAKES US TO SEE THE CODE VERY CLOGGING AND UGLY ,, are you going to add a new class and adding that in separate folder...so you can recall that method by using get ???? I didn't seen that you made that part till now
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
That was covered in the video try with resources. Can you please check that out.
@rajasekharmaddigalla1463
@rajasekharmaddigalla1463 3 жыл бұрын
Hi Amuthan, there are 2 private videos in playlist, are they some thing related to this frame work ?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Ha Ha. Yes they will be published soon.
@kranthikumarkatta9588
@kranthikumarkatta9588 3 жыл бұрын
Bro may I know how many videos still pending for completion of the selenium course ..... Can we know what has covered and what still pending for interview point of view and subject point of view
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Kranthi, We have almost covered a basic framework. But I am planning to integrate this with docker, elastic search, kibana, aws and all the Java 8 concept. Apart from that I am also planning to include design patterns into the selenium framework. So I dont have an exact number as of today. But these are all planned to be covered :)
@kranthikumarkatta9588
@kranthikumarkatta9588 3 жыл бұрын
@@TestingMiniBytes thank you so much and you are really awesome the way you teach and the way you direct us.. thank you
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
@@kranthikumarkatta9588 I am glad that i could be of some help. Thanks for active commenting. I really appreciate that. Since i was teaching virtually, feedback is essential for me to improvise 👍 I request everyone to like, comment and share your views. 🙏
@bkumarj6450
@bkumarj6450 3 жыл бұрын
@@TestingMiniBytes why your channel is different from others is teaching interesting and different concept where others channels won’t.. and the content you mentioned like docker integration and java 8 created more interest in me.. eagerly waiting for your next videos 🙏🏻
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
@@bkumarj6450 Thanks a lot again kumar. Yes, they are all getting cooked. Will be served as hot as possible. 👍
@9745754904
@9745754904 3 жыл бұрын
Thanks.amruthan for this amazing concept. Just One doubt.. Do we need to use try catch in Page class Or test class to.handle selenium.exceptions,if yes how to do it.in a effective way
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
You will get your answer in the upcoming videos. Please keep watching the videos mate. 👍 Happy learning 👍
@9745754904
@9745754904 3 жыл бұрын
@@TestingMiniBytesthanks Amruthan... Iam Waiting !!!😀
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
@@9745754904 Part 36 to part 39 are already available.
@9745754904
@9745754904 3 жыл бұрын
@@TestingMiniBytes oh OK..thanks Amruthan...im yet to watch those...
@aryan436
@aryan436 3 жыл бұрын
Hello Amuthan, Does this mean that it is better to create a separate Java class for all the common exceptions we might face in framework?
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Yes so that you can understand the errors clearly. If selenium guys have not created those exceptions like elementnotinteractable, elelementnotvisible, staleelementreferenceexceptipn and so on it will be difficult for us to maintain a framework.
@rahulsiva7204
@rahulsiva7204 3 жыл бұрын
Please make video on log4j
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Rahul, To be frank log4j is a component that we generally have in the framework but does not benefits us much. We are using extent reports for the logging and I think that is suffice to rectify the issues. I will take your feedback, reassess and make a video if it is really needed. Thanks for asking 👍🙏
@xoda345
@xoda345 2 жыл бұрын
Hi amuthan, using custom exception we will not be getting the JVM thrown exception. Without that how would we know what exactly is the issue for the failure ?? Also solution to this exception can be found in stack overflow etc sites but if we make custom made exception then we will not get those because those solution are associated with the runtime exception. Please suggest.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
You can also append the actually thrwon exception
@xoda345
@xoda345 2 жыл бұрын
@@TestingMiniBytes how to do that? Using getStackTrace method?
@sagars3332
@sagars3332 3 жыл бұрын
Hi bro my java version is 11 got some doubts in Exception handling.. when I am inserting line 1 inside try with resource block then on exception it is going to catch block and printing all customized stack trace......but inside try with resource block when I am using only fi(which we can do only after java version 9) then it is not entering catch block...but I am not able to find the reason for it can you help please..sorry for bit big lengthy text //---------->line1--FileInputStream fi=new FileInputStream(new File(FrameworkConstants.getExcelfilepath())); try(FileInputStream fi=new FileInputStream(new File(FrameworkConstants.getExcelfilepath()))) { //reading m excel data as map } catch(FileNotFoundException e) { System.out.println("inside Filenot found exception"); StackTraceElement[] a=e.getStackTrace(); System.out.println("a[0] is"+a[0]); a[0]=new StackTraceElement("com.opentesting.utils.ExcelUtils", "readExceldatainmap", "ExcelUtils.java", 67); e.setStackTrace(a); throw new RuntimeException("The file path is invalid",e); }
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 24 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 24 МЛН
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 5 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 102 МЛН
Exception Handling in Java Tutorial
13:20
Coding with John
Рет қаралды 424 М.
Selenium Framework - Part 47 - What is a Docker Image?
18:29
Testing Mini Bytes
Рет қаралды 3,1 М.
Popular Common Selenium Exceptions
21:58
Naveen AutomationLabs
Рет қаралды 45 М.
Try This if You Don’t Like Python’s Exception Handling
21:27
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 24 МЛН