//[Fact] //public void ShouldAddQualification() //{ // ShouldLogIn("1083471993"); // _driver.FindElement(By.XPath("//a[@href='/Qualification/Index']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='/Qualification/SavePreQualification']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.Id("TenderName")).SendKeys("دعوه تاهيل تست"); // StaticHelper.DelayForDemoVideo(); // new SelectElement(_driver.FindElement(By.Id("dD_TechnicalOrganizationId"))).SelectByValue("1"); // StaticHelper.DelayForDemoVideo(); // new SelectElement(_driver.FindElement(By.Id("dD_PreQualificationCommitteeId"))).SelectByValue("13"); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='#DatesStep']")).SendKeys(Keys.Enter); // _driver.FindElement(By.Id("lastOfferPressentationDate")).SendKeys("29/11/1440"); // StaticHelper.DelayForDemoVideo(); // //_driver.FindElement(By.Id("offersCheckingDate")).SendKeys("27/11/1440"); // //StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.Id("lastEnquiesDate")).SendKeys("28/11/1440"); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.Id("lastOfferPresentationTime")).SendKeys("10:30 AM"); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.Id("offersCheckingTime")).SendKeys("10:30 AM"); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='#RelationStep']")).SendKeys(Keys.Enter); // new SelectElement(_driver.FindElement(By.Id("dD_TenderAreas"))).SelectByValue("1"); // StaticHelper.DelayForDemoVideo(); // new SelectElement(_driver.FindElement(By.Id("dD_TenderAreas"))).SelectByValue("2"); // StaticHelper.DelayForDemoVideo(); // new SelectElement(_driver.FindElement(By.Id("TenderActivitieIDs"))).SelectByValue("701"); // StaticHelper.DelayForDemoVideo(); // new SelectElement(_driver.FindElement(By.Id("TenderActivitieIDs"))).SelectByValue("702"); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='#attachments']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // string filePath = "C:\\Docs\\7cbfd4c0-d604-11e8-9d6e-65d93a47075b (1) - Copy (1).pdf"; // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//input[@type='file']")).SendKeys(filePath); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.Id("btnSave")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); StaticHelper.DelayForDemoVideo(); StaticHelper.DelayForDemoVideo(); //} public void ShouldLogIn(string userName) { _driver.Navigate().GoToUrl("http://*****:*****@href='/Dashboard/Index']")).SendKeys(Keys.Enter); _driver.FindElement(By.Id("inputaUsername")).SendKeys(userName); StaticHelper.DelayForDemoVideo(); _driver.FindElement(By.Id("inputaPassword")).SendKeys("P@ssw0rd"); StaticHelper.DelayForDemoVideo(); _driver.FindElement(By.ClassName("searchBtn")).Submit(); StaticHelper.DelayForDemoVideo(); StaticHelper.DelayForDemoVideo(); }
//[Fact] //public void ShouldAddGeneralTender() //{ // ShouldLogIn("1083471993"); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='/Tender/Index']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='/Tender/BasicTenderData']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // ShouldAddBasicTenderData(); // StaticHelper.DelayForDemoVideo(); // string referenceNumber = ShouldAddTenderDate(); // StaticHelper.DelayForDemoVideo(); // ShouldAddTenderPlaces(); // StaticHelper.DelayForDemoVideo(); // ShouldAddTenderQTable(); // StaticHelper.DelayForDemoVideo(); // ShouldAddTenderFiles(); // StaticHelper.DelayForDemoVideo(); // ShouldSearchTenders(referenceNumber); // StaticHelper.DelayForDemoVideo(); // ShouldSendToApprove(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // ShouldLogOut(); // StaticHelper.DelayForDemoVideo(); // ShouldLogIn("1054976327"); //} //[Fact] //public void ShouldAddDirectPurchaseTender() //{ // ShouldLogIn("1002976304"); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='/Tender/Index']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // _driver.FindElement(By.XPath("//a[@href='/Tender/BasicTenderData']")).SendKeys(Keys.Enter); // StaticHelper.DelayForDemoVideo(); // ShouldAddBasicDirectPurchaseTenderData(); // StaticHelper.DelayForDemoVideo(); // string referenceNumber = ShouldAddTenderDate(); // StaticHelper.DelayForDemoVideo(); // ShouldAddTenderPlaces(); // StaticHelper.DelayForDemoVideo(); // ShouldAddTenderQTable(); // StaticHelper.DelayForDemoVideo(); // ShouldAddTenderFiles(); // StaticHelper.DelayForDemoVideo(); // ShouldSearchTenders(referenceNumber); // StaticHelper.DelayForDemoVideo(); // ShouldSendToApprove(); // StaticHelper.DelayForDemoVideo(); // StaticHelper.DelayForDemoVideo(); // ShouldLogOut(); // StaticHelper.DelayForDemoVideo(); // ShouldLogIn("1054976327"); //} public void ShouldAddBasicTenderData() { _driver.FindElement(By.Id("tb_TenderName")).SendKeys("منافسه عامه حالى"); StaticHelper.DelayForDemoVideo(); var driver = _driver.FindElement(By.Id("dD_TenderTypeId")); var selectElement = new SelectElement(driver); StaticHelper.DelayForDemoVideo(); selectElement.SelectByValue("9"); StaticHelper.DelayForDemoVideo(); _driver.FindElement(By.Id("tb_ConditionsBookletPrice")).SendKeys("900"); StaticHelper.DelayForDemoVideo(); var driver1 = _driver.FindElement(By.Id("dD_TechnicalOrganizationId")); var selectElement1 = new SelectElement(driver1); StaticHelper.DelayForDemoVideo(); selectElement1.SelectByValue("1"); StaticHelper.DelayForDemoVideo(); var driver2 = _driver.FindElement(By.Id("dD_OffersOpeningCommitteeId")); var selectElement2 = new SelectElement(driver2); StaticHelper.DelayForDemoVideo(); selectElement2.SelectByValue("2"); StaticHelper.DelayForDemoVideo(); var driver3 = _driver.FindElement(By.Id("dD_OffersCheckingCommitteeId")); var selectElement3 = new SelectElement(driver3); StaticHelper.DelayForDemoVideo(); selectElement3.SelectByValue("3"); StaticHelper.DelayForDemoVideo(); var driver4 = _driver.FindElement(By.Id("offersOpeningAddressId")); var selectElement4 = new SelectElement(driver4); StaticHelper.DelayForDemoVideo(); selectElement4.SelectByValue("1"); StaticHelper.DelayForDemoVideo(); var driver5 = _driver.FindElement(By.Id("dD_SpendingCategoryId")); var selectElement5 = new SelectElement(driver5); StaticHelper.DelayForDemoVideo(); selectElement5.SelectByValue("1"); StaticHelper.DelayForDemoVideo(); _driver.FindElement(By.Id("Purpose")).SendKeys(" منافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرضمنافسه عامه حالى غرض"); StaticHelper.DelayForDemoVideo(); _driver.FindElement(By.Id("txtEstimatedValue")).SendKeys("100"); StaticHelper.DelayForDemoVideo(); _driver.FindElement(By.Id("btnSave")).Submit(); }