Quality Testing

Quality is delighting customers

How to verify 200 response code of web application using Selenium Webdriver?

Can any one please provide a sample code.

Thanks,

Views: 216

Reply to This

Replies to This Discussion

public class Response_code{

public static void main (String []args){
String url = "specify url here";

try{
int resp_code = Request.get (url).execute.returnResponse().getStatusLine.getStatusCode();
}catch(Exception e)
{
throw new RuntimeException(e)
}
}
}
}

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service