Posts

Showing posts with the label Check Broken Links

Finding Broken links using Rest Assured and Selenium

Image
In the previous post, we studied about  Response Logging Feature of Rest Assured . In this post, we will learn about verifying broken links using Rest Assured. We would require to add following selenium dependencies to pom.xml file present in the project: <dependency> <groupId> org.seleniumhq.selenium </groupId> <artifactId> selenium-java </artifactId> <version> 3.4.0 </version> </dependency> Let us navigate to the website : http://restservicestesting.blogspot.in/ and find broken links present if any using the following example: import org.openqa.selenium.By ; import org.openqa.selenium.WebDriver ; import org.openqa.selenium.WebElement ; import org.openqa.selenium.chrome.ChromeDriver ; import org.testng.annotations.Test ; import java.net.URL ; import java.util.ArrayList ; import java.util.List ; import io.restassured.http.ContentType ; import io.restassured.response.R...

Popular posts from this blog

Extracting an XML Response with Rest-Assured