LR12.53 TruClient FireFox. How to enumerate objects on a page fast?
evalXPath("//ul[@class=\"some-list\"]/li[@some-status='THE STATUS I AM LOOKING FOR']");
"Evaluate JS on Object" Spends time "Waiting For Object" then returns:
var SuitableLinks = evalXPath("//ul[@class=\"some-list\"]/li[@some-status='THE STATUS I AM LOOKING FOR']"); ArgsContext.item = SuitableLinks.length;
but it still wastes time "Waiting For Object", and it still fails, so I have to use "Catch Any error" and then use Log option "Do not report errors caught by 'Catch Errors' step". I want a better solution.
Is there really no way to count objects?
Re: LR12.53 TruClient FireFox. How to enumerate objects on a page fast?
You can use the same code you shared or use document.getElementsByTagName.
BTW: ArgsContext is not needed in this statement. You can save the length to item variable. TruClient automatically saves it in the ArgsContext object.
ArgsContext.item = SuitableLinks.length;