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
644 views
Seems like you're working on some really advanced test case :p

1 answer to this question.

+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

How to capture screenshot of a webpage using Selenium Webdriver?

Hi Bindiya, you can use TakesScreenshot interface to capture the ...READ MORE

answered Jul 8, 2019 in Selenium by Abha
• 28,140 points
1,450 views
0 votes
1 answer

How can I capture screenshot of a webpage partially in Selenium?

Hey Tejasvi, you can capture screenshot of ...READ MORE

answered Jul 8, 2019 in Selenium by Anvi
• 14,150 points
1,019 views
0 votes
1 answer
0 votes
1 answer

How can I capture full webpage screenshot using Selenium Webdriver?

Hey Harbhajan, you can use Ashot() to ...READ MORE

answered Jul 29, 2019 in Selenium by Anvi
• 14,150 points
4,359 views
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,500 points
1,600 views
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 29, 2018 in Selenium by bug_seeker
• 15,520 points
1,689 views
0 votes
2 answers

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,500 points
12,697 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,597 views
0 votes
2 answers

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

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

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,508 views
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,910 points
6,667 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP