Check condition after a delay

Hi,

I am Loattesting for a web application where initially the page menu gets loaded. After the page is loaded, the javascripts will be triggered which will enable or disable few menu links, based on users profile. How to perform the check operation with delay.

In detail, the page is loaded with following menu.

  • Request Leave
  • After users logged in, the javascript will disable the menu like this.

  • Request Leave
  • Now i need to test whether the user is eligible to click the menu “leave.jsp”

    I am using following code snippet, which is always returning 1, irrespective of whether the user is eligible or not.

    check(css(“a[id=leaveMenuLink]”, “href”).count.saveAs(“isLeaveAllowed”))

    Gatling doesn’t automate web browsers. It sends and receives payloads over the network.
    Forget about what you see in your web browser, focus on what you see on the wire, eg in your browser’s Developer Tools’ Network tab.