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
86 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 in Selenium by Abha
• 16,480 points
23 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 in Selenium by Anvi
• 10,510 points
27 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,050 points
267 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 28, 2018 in Selenium by bug_seeker
• 15,310 points
118 views
+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
• 11,490 points
116 views
0 votes
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
964 views
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,050 points
266 views
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
193 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,130 points
630 views