0

I want to get URL in LI tag through X PATH and Validate these URL based on its response code.

Could someone help me to get URL from below and to validate URL using response code.

<li class="menu-link divider">
<a onclick="getSearchOption('Amazon.com','http://www.amazon.com/s?url=');"></a>
</li
user3326175
  • 37
  • 2
  • 4
  • 8
  • I would start by asking: The response code of what? I am pretty sure that there are more than 1 HTTP request been sent, each can have their own status code. – Erki M. Mar 08 '14 at 09:22

1 Answers1

0

I believe it is not target for WebDriver and I'm also not sure that it should be done in the scope of UI automation but anyway let me suggest some solution. I would use JMeter API to check response codes. Here is some help How to create and run Apache JMeter Test Scripts from a Java program? and here bit of JMeter API getResponseCode()

Community
  • 1
  • 1
olyv
  • 3,699
  • 5
  • 37
  • 67