c# - AutomationElement is still alive? -


i using microsoft ui automation , have problems it, 1 being want know if automationelement still alive. more precisely want check if window has been closed. think common case kind of question , tried different scenarios, ending solution try access different properties of element , see if throws elementnotavailableexception. stumbled upon property called isoffscreen, seems helpful in case. still, couldn't find on net, want know if there better solution. haven't been happy framework these last days because seems unstable me (especially in finding automationelement). maybe me little more expertise in implementation.

thank much

marcel

before fetching automationelement, may catch elementnotavailableexception

try  {   var info = automationelement.current;   var name = info.name; } catch (elementnotavailableexception) {} 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -