public string Inquire() { UIItem AppTitile = new UIItem("App title", By.CssSelector("#app-title"), driver); UIItem InquireButton = new UIItem("Inquiry About This Load", By.CssSelector("#load-inquiry"), driver); UIItem SendInquireButton = new UIItem("Send Inquiry", By.CssSelector("#send-inquiry"), driver); UIItem OptionButton = new UIItem("Option button", By.CssSelector("#options-button"), driver); UIItem CloseButton = new UIItem("Close Button", By.CssSelector("#modal-header-close-modal-button"), driver); UIItem PageTitle = new UIItem("Page Title - Load detail", By.CssSelector("#app-title"), driver); try { if (testData.Data("EntityName") != "FACTORINGCOMPANY") { AppTitile.Click(); Assert.IsTrue(OptionButton.WaitUntilDisplayed()); OptionButton.Click(); Assert.IsTrue(InquireButton.WaitUntilDisplayed()); } Assert.IsTrue(InquireButton.FindAndClickUsingJS()); Assert.IsTrue(SendInquireButton.WaitUntilDisplayed()); Assert.IsTrue(CloseButton.FindAndClickUsingJS()); Assert.IsTrue(SendInquireButton.WaitUtilDisappear()); return("LoadInquireSuccess"); } catch { return("LoadInquireFailed"); } }