I am excepting an element which sometimes shows up and someother time doesnt and it depends on testcase. But in our code we have something like below.
Element adjustmentDetailsWindow = Manager.ActiveBrowser.Find.ById("viewDetailsContentWindow");
So problem is when window is present, we get correct results, but if window is not present, then we get an exception saying "Object Reference not set to isntance of object"
I put them in try catch block.But is there any better way to avoid exception as well when window is not present.?