iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello All;
I want to verify that a specific row exists in a grid using javascript only for QA testing purposes ( the grid might have several pages), I am using the following steps;
var grid = window.ISGetObject(GridId());
var bfound=false;
var bfound=VerifyRowExistsInPage(Expectedrow); //this function verify all rows in the open active page and returns True if the row exist in the page false if not.
if (bfound){
return true; //if the row is found I exist the function
}
//if not I loop throw all pages of the grid until the expected row is found or I reach the last row of the grid
currentPage = grid.CurrentPageIndex;
totalpages = grid.TotalPages;
var currentsatatus;
while (currentPage <= totalpages) {
grid.GotoNextPage();
//Wait(2000); //just I wait for about some secondes do not foucs on this function if correct or not please
currentsatatus=grid.IsInProgress
while(currentsatatus){
wait (2000);
currentsatatus=grid.IsInProgress;
var bfound=VerifyRowExistsInPage(Expectedrow);
.....
......
here the rest of the code
My problem is when verifying if the grid is inprogress, it seems the variable in my code currentsatatus is always true
Can you help me please??
Hi zak benza,
Please used setInterval instead of while loop as while loop will keep your page busy. In other words it will be hard for your page to do anything else (ex: process WebGrid last action and update WebGrid status) while the script is looping so you will be stuck at the loop.
intervalObj = setInterval(function (){ if (!grid.IsInProgress) { /* do something here */ clearInterval(intervalObj); intervalObj = null; } }, 5);
Best Regards,Leo
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname