Forum Discussion
A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules.
# in a url is called an anchor link, and it's how your browser knows where in the page to position you. It is not a correct endpoint to send a request to. So in a nut shell you're trying to send a request to something that doesn't actually exist.
Use you're browsers dev tools to watch the network requests when you click one of the links. It will striped out the anchor tags.
The only work around would be to removing anything after the #, but more than likely you would just be sending the same request over and over at that point.
What is your end goal here? If you're wanting to test APIs and end points then you should look at something like ReadyAPI.
If you actually want to verify the UI and clicking links takes you to the correct place, then XmlHttpRequest isn't the approach I would use. I would actually click the link and validate the correct page / position loads.
Oh, crud... you know, LinoTadros demonstrated a way of using an Attributes checkpoint to do this kind of thing without actually doing any navigation. I'll need to go back and check my notes from Connect 2017 but it was a pretty cool way of validating links on a page. Anyone else remember that? Marsha_R?
- cunderw7 years agoCommunity Hero
I think the example LinoTadros was using may have just been verifying that all the links are present using NativeWebObject's find method to find everything that was a link. If I'm understanding correctly bb1832j wants to verify the link has a successful response.
- tristaanogre7 years agoEsteemed Contributor
No, he did something that actually checked to make sure that there was a valid response... wish I could remember what it was...
- Marsha_R7 years agoChampion Level 3
My notes say:
Web comparison checkpoint only checks HTML. If content changes, it will still pass.
Web accessibility checkpoint - 5 way compliance - see checkboxes
Related Content
- 8 months agojayrichardson