예제 #1
0
        internal static CruciatusElement FindFirst(CruciatusElement parent, By strategy, int timeout)
        {
            var element = strategy.FindFirst(parent.Instance, timeout);
            if (element == null)
            {
                Logger.Info("Element '{0}' not found", strategy);
                CruciatusFactory.Screenshoter.AutomaticScreenshotCaptureIfNeeded();
                return null;
            }

            return new CruciatusElement(parent, element, strategy);
        }