コード例 #1
0
        /// <summary>
        /// Call this method to search for a Buyer Catalog providing the profile name and identity
        /// </summary>
        /// <param name="profileName">Customer/Profile name</param>
        public void SearchForBuyerCatalog(string profileName)
        {
            if (!SelectCustomer.SelectedOption.Text.Equals(profileName))
            {
                SelectCustomer.SelectByText(profileName);
            }

            ////SearchCatalogLink.Click();
            javaScriptExecutor.ExecuteScript("arguments[0].click();", SearchCatalogLink);
            webDriver.WaitForPageLoad(new TimeSpan(0, 0, 10));
        }
コード例 #2
0
        public string GenerateCatalog(
            Workflow workflow,
            string profileName,
            string identityName,
            string validityEnd,
            string emailAddress,
            string configurationType)
        {
            SelectCustomer.SelectByText(profileName);
            webDriver.WaitForElementDisplayed(
                By.XPath("//select[@id='ContentPageHolder_drp_CBC_Identity']/option[text()='" + identityName + "']"),
                TimeSpan.FromSeconds(10));
            IdentityName.SelectByText(identityName);
            System.Threading.Thread.Sleep(10000);
            ValidityEnd.SendKeys(validityEnd);
            EmailAddress.SendKeys(emailAddress);

            if (workflow == Workflow.Eudc)
            {
                if (!string.IsNullOrEmpty(configurationType))
                {
                    Console.WriteLine("Configuration Type not provided");
                }

                ClearConfigurationTypes();

                if (configurationType.Equals("Standard Configurations"))
                {
                    ////ConfigurationTypes.ElementAt(0).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(0));
                }
                else if (configurationType.Equals("SNP"))
                {
                    ////ConfigurationTypes.ElementAt(2).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(2));
                }
            }

            if (workflow == Workflow.Asn)
            {
                if (!ConfigurationTypes.ElementAt(0).Selected)
                {
                    ////ConfigurationTypes.ElementAt(0).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(0));
                }

                if (!ConfigurationTypes.ElementAt(7).Selected)
                {
                    ////ConfigurationTypes.ElementAt(7).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(7));
                }

                if (!ConfigurationTypes.ElementAt(2).Selected)
                {
                    ////ConfigurationTypes.ElementAt(2).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(2));
                }

                if (!ConfigurationTypes.ElementAt(3).Selected)
                {
                    ////ConfigurationTypes.ElementAt(3).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(3));
                }

                if (!ConfigurationTypes.ElementAt(6).Selected)
                {
                    ////ConfigurationTypes.ElementAt(6).Click();
                    javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(6));
                }
            }

            ////GenerateCatalogLink.Click();
            javaScriptExecutor.ExecuteScript("arguments[0].click();", GenerateCatalogLink);
            webDriver.WaitForElementDisplayed(By.Id("ContentPageHolder_lbl_TY_ThreadId"), new TimeSpan(0, 0, 10));

            return(ThreadId.Text);
        }