<commit_before>﻿namespace Gu.Wpf.ToolTips.UiTests
{
    using System;
    using Gu.Wpf.UiAutomation;

    internal static class ToolTipExt
    {
        internal static bool IsOpen(this ToolTip toolTip)
        {
            Wait.For(TimeSpan.FromMilliseconds(WindowsVersion.IsRunningOnCiServer ? 50 : 300));
            try
            {
                return !toolTip.IsOffscreen;
            }
            catch (System.Windows.Automation.ElementNotAvailableException)
            {
                // Got the following exception when running on CI
                // System.Windows.Automation.ElementNotAvailableException : The target element corresponds to UI that is no longer available (for example, the parent window has closed).
                return false;
            }
        }
    }
}
<commit_msg>Try shorter wait.<commit_after>﻿namespace Gu.Wpf.ToolTips.UiTests
{
    using System;
    using Gu.Wpf.UiAutomation;

    internal static class ToolTipExt
    {
        internal static bool IsOpen(this ToolTip toolTip)
        {
            Wait.For(TimeSpan.FromMilliseconds(50));
            try
            {
                return !toolTip.IsOffscreen;
            }
            catch (System.Windows.Automation.ElementNotAvailableException)
            {
                // Got the following exception when running on CI
                // System.Windows.Automation.ElementNotAvailableException : The target element corresponds to UI that is no longer available (for example, the parent window has closed).
                return false;
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.06679269061121614, 'fraction_numerical': 0.004410838059231254, 'mean_word_length': 1.8306595365418894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3216328', 'n_tokens_mistral': 405, 'n_tokens_neox': 385, 'n_words': 106}