예제 #1
0
        public void waitForResults(String report)
        {
            String cssText = "";

            if (report.Equals("activity"))
            {
                //UIMdiv_mid_bcol_ad_actPane;

                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Activity - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                //UITestControl spinnerz = new UITestControl(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_activity_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_activity_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("balances"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Balances - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_balances_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_balances_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("holdings"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Holdings Detail - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_holdings_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_holdings_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("estimated div"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Dividends - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_est_div_int_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_est_div_int_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("account profile"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Account Profile - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_acct_profile_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_acct_profile_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("unrealized"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Unrealized Gain/Loss - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_unrealized_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_unrealized_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("realized"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Realized Gain/Loss - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_realized_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_realized_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("statements"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Monthly Statements - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_statements_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_statements_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }

            else if (report.Equals("preferences"))
            {
                BrowserWindow bcolWindow = new BrowserWindow();
                bcolWindow.SearchProperties.Add("DisplayText", "Broadcort Online :: Preferences - Windows Internet Explorer");
                bcolWindow.Find();
                HtmlDiv spinner = new HtmlDiv(bcolWindow);
                spinner.TechnologyName = "Web";
                spinner.SearchProperties.Add("Id", "mdiv_mid_bcol_ad_preferences_spinner");
                spinner.SearchProperties.Add("TagName", "DIV");
                spinner.SearchProperties.Add("ControlType", "Pane");
                spinner.SearchProperties.Add("FriendlyName", "mdiv_mid_bcol_ad_preferences_spinner");
                spinner.SearchProperties.Add("ClassName", "HtmlPane");
                cssText = spinner.GetProperty("ControlDefinition") as string;

                while (true)
                {
                    if (cssText.IndexOf("DISPLAY: none") > 0)
                    {
                        break;
                    }
                    cssText = spinner.GetProperty("ControlDefinition") as string;
                }
            }
        }