Loading ...

How to work with custom tab with Acumatica Test SDK

In this article, I want to explain how to work with the following tab when you automate tests with Acumatica Test SDK framework.

So, this is a completely custom tab, where you need to wait until the content is uploaded and is visible on the screen. Only after that, tests can be continued.

First, you need to find an element which you will wait to be visible. In this case, I chose this line on the Details panel:

After that, we need to create a method to locate a web element within a web page.

So, here is the method I’ve created:

So, it takes 3 parameters: instance of the IWebDriver interface, a locator strategy (e.g., ID, class name, XPath, etc.) to locate the web element, and timeout which indicates how long (in seconds) the method should wait for the element to become visible before timing out.

The method first checks if the timeoutInSeconds is greater than zero. This ensures that the waiting logic only executes when a positive timeout value is provided.

Inside the WaitForCondition, a lambda function is used. It tries to find the web element using driver.FindElement(by) and checks whether the element is displayed (element.Displayed).

The total wait time is set to the specified timeoutInSeconds converted to milliseconds, and a polling interval of 500 milliseconds is likely used to check the condition repeatedly during the wait period.

Finally, I passed the following parameters to this method:

FindElement(Browser.WebDriver, By.CssSelector("#details-panel h3"), 3000);

In this way, my test is waiting till the specific Details panel line is visible, and only after that it is continued further.

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5