How to get count of number of open application instance

uiautomation
studio

#1

Hi,
I want to know how to count number of open same application.
As per example open multiple instance of google chrome then how to count number of open instance.

Thanks
Gaurav


#2

Hey @gaurav_kumar

have you tried this?

Int count_instance = Process.GetProcessesByName("chrome").Length;
Writeline(count_instance.Tostring());

Note- Chrome create a separate process for each tab so you will get count more based on tabs.

Regards…!!
Aksh


#3

Thanks @aksh1yadav
It’s code is working fine.
any activity available for this.

Regards
Gaurav