<commit_before>﻿using System;
using System.Linq;
using System.Windows.Controls;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Windows.Controls.Primitives;
using Keys = System.Windows.Forms.SendKeys;
using System.Windows.Automation;
using Button=System.Windows.Forms.Button;
using System.Threading;
using System.Windows;
using System.Diagnostics;
using System.IO;

namespace Functional
{
    public class MeTL
    {
        private static Process metlProcess;
        private static readonly string workingDirectory;

        static MeTL()
        {
            var baseDirectory = "MeTLMeeting";
            var currentDirectory = Directory.GetCurrentDirectory();
            workingDirectory = currentDirectory.Remove(currentDirectory.IndexOf(baseDirectory) + baseDirectory.Length) + @"\SandRibbon\bin\Debug";
        }

        public static AutomationElement GetMainWindow()
        {
            var mainWindow = AutomationElement.RootElement.FindFirst(TreeScope.Subtree, new PropertyCondition(AutomationElement.AutomationIdProperty, Constants.ID_METL_MAIN_WINDOW));        

            return mainWindow; 
        }

        public static AutomationElementCollection GetAllMainWindows()
        {
            var mainWindows = AutomationElement.RootElement.FindAll(TreeScope.Subtree, new PropertyCondition(AutomationElement.AutomationIdProperty, Constants.ID_METL_MAIN_WINDOW));

            return mainWindows;<commit_msg>Changed GetMainWindow and GetAllMainWindows to only search children<commit_after>﻿using System;
using System.Linq;
using System.Windows.Controls;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Windows.Controls.Primitives;
using Keys = System.Windows.Forms.SendKeys;
using System.Windows.Automation;
using Button=System.Windows.Forms.Button;
using System.Threading;
using System.Windows;
using System.Diagnostics;
using System.IO;

namespace Functional
{
    public class MeTL
    {
        private static Process metlProcess;
        private static readonly string workingDirectory;

        static MeTL()
        {
            var baseDirectory = "MeTLMeeting";
            var currentDirectory = Directory.GetCurrentDirectory();
            workingDirectory = currentDirectory.Remove(currentDirectory.IndexOf(baseDirectory) + baseDirectory.Length) + @"\SandRibbon\bin\Debug";
        }

        public static AutomationElement GetMainWindow()
        {
            var mainWindow = AutomationElement.RootElement.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.AutomationIdProperty, Constants.ID_METL_MAIN_WINDOW));        

            return mainWindow; 
        }

        public static AutomationElementCollection GetAllMainWindows()
        {
            var mainWindows = AutomationElement.RootElement.FindAll(TreeScope.Children, new PropertyCondition(AutomationElement.AutomationIdProperty, Constants.ID_METL_MAIN_WINDOW));

            return mainWindows;
{'fraction_non_alphanumeric': 0.07317073170731707, 'fraction_numerical': 0.0, 'mean_word_length': 3.643081761006289, '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': '512794', 'n_tokens_mistral': 747, 'n_tokens_neox': 727, 'n_words': 156}