Skip to end of metadata
Go to start of metadata

Its purpose is to guard that the interaction of the user will raise specific request to the server. It differs between following types:

  • No Request
  • XHR Request (AJAX)
  • HTTP Request (regular HTTP)

Guarding Request Type

You can create new RequestGuard with given type defined in constructor:

More intuitive and also preferred way of usage is the usage of Graphene Utility static members:

Internally, factory creates immutable copy of CommandInterceptionProxy and also AjaxSelenium and returns this modified copies, thereby the last call clicking to ANY_BUTTON will not be intercepted by any RequestGuard.

It brings simplicity to quite hard-to-understand topic.

Waiting for RequestType

Together with guarding the request type done, there is also the possibility to wait until the page will catch the given request type, ignoring all other requests.

For this purpose, you can again use Graphene Utility, similary to previous sample:

This is useful in cases, where you expect that also other request can be done.

For example you are relocating to new URL, but on the current page is still active using AJAX (triggering XMLHttpRequest).

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.