public override IDocEntity SaveChanges(bool ignoreCache, DocConstantPermission permission)
 {
     ArticleId   = ArticleId?.TrimAndPruneSpaces();
     ArticleLink = ArticleLink?.TrimAndPruneSpaces();
     SearchLink  = SearchLink?.TrimAndPruneSpaces();
     return(base.SaveChanges(ignoreCache, permission));
 }
Beispiel #2
0
        internal void CommonUtilsPage(string name, string titleRead)
        {
            //Start the Reports
            Base.ExtentReports();
            Base.test = Base.extent.StartTest("Search Job Title to find Skill trader");
            Thread.Sleep(1000);
            try
            {
                //Simple Search
                SearchSkillBox.Click();
                SearchSkillBox.SendKeys(titleRead);
                SearchSkillBox.SendKeys(Keys.Enter);
                Thread.Sleep(1000);

                string expectedValue = name;
                string actualValue   = GlobalDefinitions.driver.FindElement(By.XPath("//a[contains(.,'" + name + "')]")).Text;
                Thread.Sleep(500);

                if (expectedValue == actualValue)
                {
                    // Screenshot
                    string img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Report");
                    Base.test.Log(LogStatus.Info, "Snapshot below: " + Base.test.AddScreenCapture(img));
                    Base.test.Log(LogStatus.Pass, "Test Passed, Test Analyst searched Anna Jacob found Successfully");
                    Console.WriteLine("Listing added found");
                }

                else if (expectedValue != actualValue)
                {
                    Base.test.Log(LogStatus.Fail, "Test Failed");
                    Console.WriteLine("Listing not found test failed ");
                }

                //Complex search
                SearchLink.Click();
                Thread.Sleep(1000);
                SearchCategories.Click();
                SearchSubCategories.Click();
                SearchFilter.Click();
                if (expectedValue == actualValue)
                {
                    // Screenshot
                    string img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Report");
                    Base.test.Log(LogStatus.Info, "Snapshot below: " + Base.test.AddScreenCapture(img));
                    Base.test.Log(LogStatus.Pass, "Test Passed, Test Analyst searched Anna Jacob found Successfully");
                    Console.WriteLine("Listing added found");
                }

                else if (expectedValue != actualValue)
                {
                    Base.test.Log(LogStatus.Fail, "Test Failed");
                    Console.WriteLine("Listing not found test failed ");
                }
            }
            catch (Exception e)
            {
                Global.Base.test.Log(LogStatus.Fail, "Test Failed", e.Message);
            }
        }
Beispiel #3
0
        public bool CreateNewProfileIdentity(string identityName, string customerSet, string accessGroup)
        {
            IdentityNameField.Set(identityName);
            CustomerSetField.Set(customerSet);
            SearchLink.Click();
            PageUtility.WaitForPageRefresh(webDriver);

            if (SelectAccessGroup.SelectedOption.Text.Equals("--Select an Item--"))
            {
                SelectAccessGroup.SelectByValue(accessGroup);
            }

            javaScriptExecutor.ExecuteScript("arguments[0].click();", CreateThisIdentityLink);
            PageUtility.WaitForPageRefresh(webDriver);
            return(string.Equals(ConfirmationLabel.Text.Trim(), "Profile Identity created successfully."));
        }
Beispiel #4
0
        public void SearchForFoo()
        {
            var httpClient = new HttpClient();
            var searchLink = new SearchLink()
                {
                    Target = new Uri("http://www.stackoverflow.com/opensearch.xml"),
                    //Target = new Uri("https://www.w3.org/Bugs/Public/search_plugin.cgi"),
                    Type = new MediaTypeWithQualityHeaderValue("application/opensearchdescription+xml")
                };
            var searchMission = new SearchMission(httpClient, searchLink);
            var response = searchMission.GoAsync("evolvable").Result;
            var results = response.Content.ReadAsStringAsync().Result;

            var response2 = searchMission.GoAsync("issue 14").Result;
            var results2 = response2.Content.ReadAsStringAsync().Result;
        }
Beispiel #5
0
        //[Fact]
        public void SearchForFoo()
        {
            var httpClient = new HttpClient();
            var searchLink = new SearchLink()
            {
                Target = new Uri("http://www.stackoverflow.com/opensearch.xml"),
                //Target = new Uri("https://www.w3.org/Bugs/Public/search_plugin.cgi"),
                Type = "application/opensearchdescription+xml"
            };
            var searchMission = new SearchMission(httpClient, searchLink);
            var response      = searchMission.GoAsync("evolvable").Result;
            var results       = response.Content.ReadAsStringAsync().Result;

            var response2 = searchMission.GoAsync("issue 14").Result;
            var results2  = response2.Content.ReadAsStringAsync().Result;
        }