HOW TO FIND JAVASCRIPT ERRORS FROM YOUR WEB APPLICATION USING SELENIUM

preview_player
Показать описание
HOW TO FIND JAVASCRIPT ERRORS FROM YOUR WEB APPLICATION USING SELENIUM:

It is a known fact that most of the modern web applications in use today involve an extensive use of JavaScript for the client side processing which makes it all the more important to capture all JavaScript exceptions and consider each Java Script exception as a bug that needs to be fixed, irrespective of whether it is currently affecting the website functionality or the user experience.

~~~APPROACH : USING CHROMEDRIVER2 (WEBDRIVER FOR CHROME)
In the GTAC 2013, Ken Kania from Google has explained how ChromeDriver2 is different from its previous version as it uses Chrome DevTools API and now it provides access to internals of Web App and we can do things like:

Query and manipulate DOM tree
Debug JavaScript and extracting JavaScript errors
Memory and Performance Profiling
Network Traffic Monitoring

I would like to recommend this approach as it is very simple.

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

~~~WebServices API Automation Series:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
-------------------------------

✔️SOCIAL NETWORKS
--------------------------------

Support My Channel✔️Or Buy Me A Coffee
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
Рекомендации по теме
Комментарии
Автор

Your explanation is really very interesting and simple to understand. Thanks for sharing valuable knowledge with us.

rakeshsingh
Автор

Thanks alot Naveen. Can you please upload the videos to automate Google analytics and Google tag manager calls on webpage ? It ll be very helpful for me. Thanks in advance.

gobindsah
Автор

Thanks Bro, Nice Explanation.
Just One Question: IF I Just Want To Get The SEVERE Logs. Then What Changes I Need To Make ?

gurudattapraharaj
Автор

can you please tell me how to implement this approach for IE and firefox browser

sabarinathang
Автор

Great explanation.
Just one thing, when we are moving from one page to another, we are calling this method (extractJSLogsInfo)again and again. Its kind of repetitive line of code. Suppose we have a test case which involves 7 or 8 pages, we will have to call this method so many times in one test case. Isn't there any better way through which we don't call this method again and again and it can still automatically shows us the console errors along with page urls which produce those errors.

anujgoel
Автор

Hi Naveen,

Can you please shed some light on JSON.stringify() error that we are facing on latest chrome/edge browser versions.

baluzen
Автор

Hi Naveen, thanks for sharing this valuable knowledge. Would you please explain how to resolve JSON.stringify() error in selenium java??

truptisagarikasahoo
Автор

How does it affects the application, can you please provide that information as well so that on that basis we can log our bugs, as in facebook also we could see such errors?

ashutoshanand
Автор

i Want to compare yesterday and today's console error output stored in file and check if there are new errors how can it be done can you share that video as well please

rashmiprakash
Автор

Naveen,
can you please have a video on selenium grid

bharathvansh
Автор

Hi Naveen, Good explanation and good insights. I have a clarification. I just ran the code and used facebook.com, But few console errors like "Uncaught SyntaxError: Identifier 'originalPrompt' has already been declared" and "ErrorUtils caught an error" etc are not getting captured when I run the selenium code.
But, These errors are there when i inspected the page. Can you please help

prashantht.v
Автор

thanks, please share git link for this

rakeshadupa
Автор

Just more of a basic questions, why is there a need to fix that errors, what will happen if we don't fix them?

Zeux
Автор

Thanks Naveen, is that possible to get the Java script errors in Firefox and IE?? I tried the same approach for Firefox and i got the exception

sabarinathang
Автор

i have used same code for same url but i didnt get any errors in my console pannel

sreelarukmini
Автор

Naveen,
I want to break my test suite of 500+ test cases in 5 batches (100 each) and execute the test cases simultaneously or parellely

bharathvansh
Автор

I ran the same code but am getting webdriver exception unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level' "

seshadrisrinivasan
Автор

Please make vedio on find javascript error in Selenium C#

farrukhkamran
Автор

What if I do require this method to be called at every test step in @test method.. Kindly let me know???

harinathannavarapu
Автор

Thanks Naveen, But when i tried to execute
chrome
INFO: Using `new ChromeOptions()` is preferred to

okhttp3/ConnectionPool

erro is coming in line : driver = new ChromeDriver(capabilities);

Can you please guide???

nayonikad