How Selenium capture webpage errors?

+3 votes

I am using Selenium with C# and NUnit to make a test system for a web application stage. 

The stage can toss exemption if something turns out badly. 

I am pondering that is there a route for program/page to advise Selenium that an exemption is tossed so I can utilize selenium to catch and record the special case as opposed to keeping Selenium checking website page and js comfort?

Sep 20, 2018 in Selenium by soujanyabargavi
• 210 points
Seems like you're working on some really advanced test case :p

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote

Selenium capture webpage errors by url verification.

Step 1: We need to open a web page and fetch all elements having href attribute.

Step 2: As there are more than 500 links in those pages, it takes very long to check all URL’s. So basic multi-threading works very well. So we create 30 thread to fetch all URL’s.

Step 3: Our threads have the basic implementation of HTTPClient and make a GET request to URLs.

Step 4: In case of HTTP response is other than 200, we add this URL to a list to be able to report them after the test execution.

Step 5: After all the links are controlled, we check our error list. In case the list is not empty, we fail with an assertion.

answered Oct 30, 2018 by martint
It helped me. Thank You @martin

Related Questions In Selenium

0 votes
1 answer

Can we capture JavaScript errors in Selenium

This might work. Add the below code ...READ MORE

answered Jun 21, 2018 in Selenium by nsv999
• 5,030 points
0 votes
1 answer

How to wait for the webpage to load in selenium using java

Firstly, when you launch a web application, ...READ MORE

answered Aug 28, 2018 in Selenium by bug_seeker
• 14,970 points
+1 vote
2 answers

How to get the title of a webpage using Selenium Java?

Essentially, driver.getTitle(); function can be used to ...READ MORE

answered Dec 17, 2018 in Selenium by Vardhan
• 10,600 points
+1 vote
2 answers

How to scroll down a webpage in selenium using Java?

This works... JavascriptExecutor jse = (JavascriptExecutor)driver; j ...READ MORE

answered Apr 3 in Selenium by anonymous
0 votes
1 answer
0 votes
1 answer

How to press CTRL+A in a webpage using selenium?

You can try using the following command:- driver.findElement(By.lin ...READ MORE

answered Jan 11 in Selenium by Ravi
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
0 votes
1 answer
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,590 points
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.