cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

New Contributor

Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

Greetings.

 

I am working with dynamic content found within an html table (results of views, searches, etc...).  When modifying the example code found here:

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/examples/parsing-html-tables...

 

When I find the record I'm looking for, I can break out of the loop and return a specific cell's value for validation quickly and easily.  However, if I attempt to double click the cell or click on an edit link within the cell (both open the crud screen for the record), it takes 5+ minutes for the action to be performed.  When performed, it does what it is supposed to do and opens the crud screen.

 

i've tried using the the loop variable "cell" to perform the action against.

 

Thinking it might be a problem with how the tables are parsed, I've also tried using the FindChild method to click on the elements, but I get the same delay.

 

There is no delay if I actually have the object NameMapped / Aliased, but that defeats the purpose of testing dynamic content for data driven tests.

 

Any help would be appreciated.  Sanitized sample code below:

 

function openRecord(recordName){
var recordTable = Aliases.browser.somePage.someTable

Log.AppendFolder("Table");
for (var i = 0; i < recordTable.RowCount; i++){
Log.AppendFolder("Row " + i);

var cellName = recordTable.Cell(i, 2); //Cheating here using a specific column index.
Log.Message("cellName: " + cellName.innerText);
//Some code to remove embedded html nbsp
if(aqString.Compare(CommonUtils.removeNBSP(cellName.innerText), recordName, false) == 0){
Log.Message("FOUND IT!");
// This double click takes 5 minutes!
cellName.DblClick();
break;
}
Log.PopLogFolder();
}
Log.PopLogFolder();
}

 

5 REPLIES 5
Highlighted
Community Hero

Re: Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

Well, here's the question...  do you need to double click on the cell?  Or do you need to double click on some component in the content of the cell?  I'm guessing the latter?  In which case, once you find the cell you're looking for, perhaps you should do something like

 

var control = cellName.FindChild('ObjectType', 'link', 1)

if (control.Exists) control.DblClick()


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Contributor

Re: Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

Thanks for the response Robert,

 

I have the option to double click the row (or cells within the row) or single click the link within a particular cell.  All give the same result.  I actually did try your recommendation before with several different variations of the cell and the link within the cell.  Sorry, I wasn't explicit about that when mentioning the use of the findChild method.

 

Just to be sure, I gave it another shot (your example was more concise than mine).  Sadly, I get the same delayed action.  I threw in a log message before clicking the control - it found it right away.

 

Russ

Community Hero

Re: Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

OK... then it sounds like a caching thing.  That while it may be looping through, there may be something else that's needed to actually select the object.  Try a RefreshMapping Info on the table object before doing the click.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Contributor

Re: Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

Kudos for the help in troubleshooting with refresh mapping (I wasn't familiar with that).

 

Alas, still stumped.  I also tried to refresh the page to no avail.

 

Community Manager

Re: Parsing HTML table is quick, but clicking a found item is delayed by 5+ minutes.

Hi @RussH,

 

Take a look at the Enhancing TestComplete Performance article - it contains great tips that can help you.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors