public void Common_methods() { Global.Driver.wait(5); //Click on the Owners tab Tenanttab.Click(); //Click MyRequest tab MyRequesttab.Click(); //click add request tab Addrequesttab.Click(); //click Select property SelectProperty.Click(); //select dropdown SelectPropertydropdown.Click(); //Type dropdown TypeDropDown.Click(); TypeOption.Click(); Message.SendKeys(ExcelLib.ReadData(3, "TestData")); SaveButton.Click(); Tenanttab2.Click(); MyRequesttab2.Click(); //Enter the value in the search bar SearchBar.SendKeys("automate test for verification"); Global.Driver.wait(5); //Click on the search button SearchButton.Click(); }
public void Common_methods() { Global.Driver.wait(5); //Click on the Owners tab Ownertab.Click(); //Click MyRequest tab MyRequesttab.Click(); // CLick AddRequest tab AddRequesttab.Click(); // CLick Duedate tab DueDate.Click(); //send keys Description Description.SendKeys(ExcelLib.ReadData(3, "TestData")); //click savebutton SaveButton.Click(); //click owner again Ownertab2.Click(); //My Request again MyRequesttab2.Click(); //Enter the value in the search bar SearchBar.SendKeys("Added for verification"); Global.Driver.wait(5); //Click on the search button SearchButton.Click(); }
internal void SearchMethod() { ExcelLib.PopulateInCollection(Base.ExcelPath, "PropertyDetails"); SearchBar.SendKeys(ExcelLib.ReadData(2, "PropertyName")); SearchButton.Click(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Property Searched Using Search Menu"); }
//Search the property internal bool SearchAPropertySuccessfully(String searchPropertyName) { try { Driver.WaitForElementVisible(Driver.driver, By.XPath("//input[@name='SearchString']"), 15); //Enter the value in the search bar SearchBar.SendKeys(searchPropertyName); //Click on the search button SearchButton.Click(); string ExpectValue = searchPropertyName; string ActualValue = FirstPropertyNameButton.Text; if (ActualValue.Equals(ExpectValue)) { return(true); } else { return(false); } } catch { return(false); } }
public void ClickOnSearchBarInJiraTypeProjectNameAndEnterProjectPage() { SearchBar.Click(); SearchBar.SendKeys("Test for ElectronicPlattform Development"); ViewAllMatchingProjectOptionInSearchBar.Click(); ProjectNameAfterAllMatchingProjectsDisplayed.Click(); }
internal void SearchAnimation() { Global.GlobalDefinitions.wait(20); SearchBar.SendKeys("Animation"); Global.GlobalDefinitions.wait(60); MagnifyingGlass.Click(); Global.GlobalDefinitions.wait(60); for (var i = 1; i <= 10; i++) { var Textcode = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-search-section']/div[2]/div/section/div/div[2]/div/div[2]/div/div/div[" + i + "]/div[1]/a[2]/p")).Text; Console.WriteLine(Textcode); if (Textcode == "Animation") { GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-search-section']/div[2]/div/section/div/div[2]/div/div[2]/div/div/div[" + i + "]/div[1]/a[2]/p")).Click(); Console.WriteLine("Test Passed"); Base.test.Log(LogStatus.Info, "Successfully Searched Animation"); return; } } }
public void SearchDentalServices() { //Enter the "Dental Services" sentence in the search bar SearchBar.SendKeys("Dental Services"); Global.Driver.wait(5); //Click on the search button SearchButton.Click(); }
public ExampleResultPage SearchString(string searchTerm) { WaitForElementToBeEnabled(TopSearchButton); TopSearchButton.Click(); WaitForElementToBeDisplayed(SearchBar); SearchBar.SendKeys(searchTerm); SearchBar.Submit(); return(new ExampleResultPage()); }
internal void SearchMethod() { try { ExcelLib.PopulateInCollection(Base.ExcelPath, "PropertyDetails"); SearchBar.SendKeys(ExcelLib.ReadData(2, "PropertyName")); BtnSearch.Click(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Property Searched Using Search Menu"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "issue in Search Method"); throw; } }
//Search a property internal void SearchAProperty() { try { //Calling the common methods Common_methods(); Thread.Sleep(1000); //Enter the value in the search bar SearchBar.SendKeys("TestingProperty"); Thread.Sleep(1000); //Click on the search button SearchButton.Click(); Thread.Sleep(2000); //Verification string ExpectedValue = "TestingProperty"; Assert.IsTrue(Driver.driver.PageSource.Contains(ExpectedValue)); SaveScreenShotClass.SaveScreenshot(Driver.driver, "Search"); string ActualValue = Driver.driver.FindElement(By.XPath("//*[@id='main-content']/section/div[1]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/a/h3")).Text; //Assert.AreEqual(ExpectedValue, ActualValue); if (ActualValue == ExpectedValue) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull"); } } catch (Exception e) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message); } }
internal void SearchAProperty() { try { //Calling the common methods Common_methods(); Thread.Sleep(500); //Select properties page PropertiesPage.Click(); //Driver.wait(5); //Enter the value in the search bar SearchBar.SendKeys("TestingProperty"); Thread.Sleep(500); //Global.Driver.wait(5); //Click on the search button SearchButton.Click(); Thread.Sleep(1000); //Driver.wait(5); string ExpectedValue = "TestingProperty"; string ActualValue = Global.Driver.driver.FindElement(By.XPath("//div[@class='six wide column']/a/h3")).Text; //Assert.AreEqual(ExpectedValue, ActualValue); if (ExpectedValue == ActualValue) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull"); } } catch (Exception e) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message); } }
internal void SearchProp() { try { Thread.Sleep(1500); //Click on Skip button Skip.Click(); Thread.Sleep(1500); //Calling the common methods Common_methods(); Thread.Sleep(1000); Driver.wait(5); //Enter the value in the search bar SearchBar.SendKeys("TestingProperty"); Global.Driver.wait(5); //Click on the search button SearchButton.Click(); Driver.wait(5); string ExpectedValue = "TestingProperty"; string ActualValue = Global.Driver.driver.FindElement(By.XPath("//*[@id='main-content']/section/div[1]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/a/h3")).Text; //Assert.AreEqual(ExpectedValue, ActualValue); if (ExpectedValue == ActualValue) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull"); } } catch (Exception e) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message); } }
internal void SearchAProperty() { try { Driver.wait(5); ExcelLib.PopulateInCollection(Base.ExcelPath, "PropertyDetails"); //Enter the value in the search bar SearchBar.SendKeys(ExcelLib.ReadData(2, "PropertyName")); Global.Driver.wait(5); //Click on the search button SearchButton.Click(); Driver.wait(5); string ExpectedValue = ExcelLib.ReadData(2, "PropertyName"); string ActualValue = Global.Driver.driver.FindElement(By.XPath(".//*[@id='main-content']/section/div[1]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/a/h3")).Text; Base.extent = new ExtentReports(Base.ReportPath, true, DisplayOrder.NewestFirst); Base.test = Base.extent.StartTest("Add new property", "Adding property details"); if (ExpectedValue == ActualValue) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull"); } } catch (Exception e) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message); } extent.EndTest(test); extent.Flush(); }
internal void SearchAProperty() { try { //Calling the common methods Common_methods(); Driver.wait(5); //Enter the value in the search bar SearchBar.SendKeys("TestingProperty"); SearchBar.SendKeys(Keys.Enter); Global.Driver.wait(5); //Click on the search button SearchButton.Click(); Driver.wait(20); System.Threading.Thread.Sleep(3000); string ExpectedValue = "TestingProperty"; IWebElement searchInput = Global.Driver.driver.FindElement(By.Id("SearchBox")); string ActualValue = searchInput.Text; //Assert.AreEqual(ExpectedValue, ActualValue); if (ExpectedValue == ActualValue) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull"); } } catch (Exception e) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message); } }
/// <summary> /// search the property /// </summary> internal void SearchAProperty() { try { //Calling the common methods //Enter the value in the search bar SearchBar.SendKeys("Morgan"); //Click on the search button SearchButton.Click(); string ExpectedValue = "Morgan"; string ActualValue = Driver.driver .FindElement( By.XPath( "/html[1]/body[1]/div[2]/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/a[1]/h3[1]")) .Text; //Assert.AreEqual(ExpectedValue, ActualValue); if (ExpectedValue == ActualValue) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull"); } } catch (Exception e) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message); } }
public void InputTextInSearchBar(string searchCriteria) { SearchBar.SendKeys(searchCriteria); SearchBar.SendKeys(Keys.Enter); }
//A method to search for a property using a given search string internal void SearchForProperty(string SearchString) { SearchBar.SendKeys(SearchString); SearchButton.Click(); }
public void SearchCompany(string ticker) { SearchBar.SendKeys(ticker); SubmitSearchButton.Click(); }
public void SearchCompany(string ticker) { SearchBar.SendKeys(ticker); SearchBar.SendKeys(Keys.Enter); }
/// <summary> /// fill the search box and click search button /// </summary> /// <param name="propertyName"></param> void FillSearchBoxAndCLickSearch(string propertyName) { SearchBar.Clear(); SearchBar.SendKeys(propertyName); SearchButton.Click(); }
public GoogleLanding Enter_SearchBar() { SearchBar.SendKeys(Keys.Enter); return(this); }
public GoogleLanding SendKeys_SearchBar(string text) { SearchBar.SendKeys(text); UpdateState("ResultsAvaible", "true"); return(this); }