Can we check the Products count under every Categories using Junit

I have a query to check count of products under every Category is it possible to click every product and find count ?
I have implemented the code but its not waiting for the page load
Showing the list as below

I have implemented the below code

I have used thread.sleep but it did’t worked is there any way to wait for the page load

Thanks,
Sumanth P

Hi, you are not running a real browser and so there is not need to wait for JS at all. I assume your page is modified by JS or the components are replaced by JS, hence you don’t see that in the tree.