Micro Focus QTP (UFT) Forums
[UFT] Len of DIV founded by ClassName - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: [UFT] Len of DIV founded by ClassName (/Thread-UFT-Len-of-DIV-founded-by-ClassName)



[UFT] Len of DIV founded by ClassName - robertosalemi - 01-19-2016

Hi,
I'm testing a web application.

In Firebug of Firefox, with this code I have to check the num of div with my className:
Code:
$(document).ready(function() {
  alert( $('.blockPage').length );
});
It displays 0.

In UFT I'm using this code:
Code:
Set loader = Browser("myApp").Page("myApp").Object.getElementsByClassName("blockPage")
var exist = Len(loader)
exist is equals to 8.

Why is there this two different values?

Thanks.