public void certificateUsageValidation() { Console.WriteLine("_16CertificateUsageValidation"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); String giftName = loginHelper.GetFromFile("Certificate"); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on user-id loginHelper.ClickElement("ClickId"); //Click on my gift certificate eventHelper.ClickElement("MyGiftcertificate"); //Verify title verifyTitle("Check GC Balance"); //Click on Check button wihtout entering number eventHelper.ClickElement("GCTrans"); //Verify validation message eventHelper.WaitForTextInPage("Please enter gift certificate code.", 20); //Enter invalid gift code eventHelper.type("GiftCode", "12123"); //Click on Check button eventHelper.ClickElement("GCTrans"); //Verify validation message eventHelper.WaitForTextInPage(" No transaction found.", 30); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CheckCertificateUsage - Artzy"); }
public void validationdiscount() { Console.WriteLine("_25ValidationDiscounts"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Scroll to element eventHelper.scrollToElement("Discount"); //Click on discount tab eventHelper.ClickElement("Discount"); //Verify page title verifyTitle("Discounts"); //click on new discounts eventHelper.ClickElement("newdiscount"); //verify title verifyTitle("Add Discount"); //enter value of discounts eventHelper.type("pricediscount", ""); //enter value of limit eventHelper.type("limitdiscounts", "11"); //click on save eventHelper.ClickElement("savediscounts"); //verify text eventHelper.verifyElementPresent("enterrequiredvalues"); }
public void pageChildInactive() { Console.WriteLine("_17PageChildInactive"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); string pagename = loginHelper.GetFromFile("Page"); string childname = loginHelper.GetFromFile("Child"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Site dropdown eventHelper.ClickElement("SiteDropdown"); //Scroll down eventHelper.scrollToElement("Navigate"); //Click on Navigation eventHelper.ClickElement("Navigate"); //Wait for text eventHelper.WaitForTextInPage("Navigation", 30); //Verify Title verifyTitle("Navigation"); //Activate child eventHelper.ClickElement("actions"); //click to deactivate eventHelper.ClickElement("activate"); //wait for text eventHelper.WaitForTextInPage("Navigation saved successfully.", 30); //Wait for text eventHelper.WaitForTextInPage("Action", 30); Thread.Sleep(2000); //Scroll to element eventHelper.scrollToElement("Home"); //Click on home tab eventHelper.ClickElement("Home"); //verify title //verifyTitle("Home"); //Wait for text eventHelper.WaitForTextInPage("Home", 30); //click on home tab eventHelper.ClickElement("hometab"); //Verify child not availble eventHelper.VerifyPageTextNotAvailable("child1");//,30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("PageChildInactive - Artzy"); }
public void checkBuyTicket() { Console.WriteLine("_17CheckBuyTicket"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); String eventName = loginHelper.GetFromFile("EventName"); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on on Home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage("Cart", 40); //Click on Event tab. eventHelper.ClickElement("EventTab"); //Verify title verifyTitle("Upcoming Events"); //Click on event eventHelper.clickOnEvent(eventName); //wait for tickets eventHelper.WaitForTextInPage("Tickets", 20); //Enter quantity eventHelper.type("Quantity", "10"); //Click ON Buy now button eventHelper.ClickElement("BuyNow"); //wait for text eventHelper.WaitForTextInPage("Remove", 30); //Enter card number eventHelper.type("Card", "4242424242424242"); //Enter cvv eventHelper.type("CVV", "321"); eventHelper.scrollToElement("Month"); //Select Month eventHelper.SelectLastFilterValue("Month", "05 - May"); //Select year eventHelper.SelectValueFilter("Year", "2019"); //Enter address eventHelper.type("CardAdd", "Test Add"); //Enter city eventHelper.type("CardCity", "Alaska"); //Select State eventHelper.SelectValueFilter("CardState", "Alaska"); //Enter Zip eventHelper.type("CardZip", "201301"); //Click on Submit button eventHelper.ClickElement("Submit"); //Wait for order code eventHelper.WaitForTextInPage("Order Code:", 30); //Wait for event name eventHelper.WaitForTextInPage(eventName, 20); //Wait for status eventHelper.WaitForTextInPage("Paid", 10); //Click on menu loginHelper.ClickElement("OrderLog"); //Click on My ticket loginHelper.ClickElement("MyTicket"); //Wait for text loginHelper.WaitForTextInPage("Used",30); //Wait for text loginHelper.WaitForTextInPage("Quantity", 30); //Wait for ticket loginHelper.WaitForTextInPage("10",30); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CheckBuyTicket - Artzy"); }
public void instructoValidationr() { Console.WriteLine("_12InstructonValidationr"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Event dropdown eventHelper.ClickElement("EventDropdown"); //Scroll to element eventHelper.scrollToElement("CreateIns"); //Click on Create instructor eventHelper.ClickElement("CreateIns"); //Wait for text eventHelper.WaitForTextInPage("Instructors", 30); //Verify Title verifyTitle("Instructor List"); //Click on new button eventHelper.ClickElement("NewButton"); //Wait for text eventHelper.WaitForTextInPage("Instructor Bio", 30); //Verify Title verifyTitle("Manage Profile"); //Enter Email // eventHelper.type("InsEmail", InsEmail); //Click on Save button without first and last name eventHelper.ClickElement("InsSave"); //Verify //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("InstructoValidationr - Artzy"); }
public void locationValidation() { Console.WriteLine("_11LocationValidation"); string username = ""; string[] password = null; string venname = "Devner"; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Event dropdown eventHelper.ClickElement("EventDropdown"); //Scroll down eventHelper.scrollToElement("Location"); //Click on Location eventHelper.ClickElement("Location"); //Wait for text eventHelper.WaitForTextInPage("Locations", 30); //Click on Add New Location button eventHelper.ClickElement("NewLoc"); //Click on 'Save button without filling the field. eventHelper.performClick("LocSave"); //veify validation message eventHelper.WaitForTextInPage("Venue name is required.", 30); eventHelper.WaitForTextInPage("Address1 is required", 30); eventHelper.WaitForTextInPage("City is required.", 30); //Click on Manual Location link eventHelper.ClickElement("ManLoc"); //Wait for text eventHelper.WaitForTextInPage("Venue Name", 30); //Enter Venue Name eventHelper.type("VenName", venname); //Click on 'Save button after filling the venue name field. eventHelper.performClick("LocSave"); //veify validation message eventHelper.WaitForTextInPage("Address1 is required", 30); eventHelper.WaitForTextInPage("City is required.", 30); //Enter Address1 eventHelper.type("Addre1", "Address1"); //Click on 'Save button after filling the Address field. eventHelper.performClick("LocSave"); //wait for text eventHelper.WaitForTextInPage("City is required.", 30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("LocationValidation - Artzy"); }
public void creatCertificate() { Console.WriteLine("_16CreateCertificate"); String giftName = "AutomatedGift" + AlwaysRandom(); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); eventHelper.SetInFile("Certificate", giftName); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Srcoll to element eventHelper.scrollToElement("CeateCertificate"); //Click on Create certificare eventHelper.ClickElement("CeateCertificate"); //Verify title verifyTitle("Gift Certificates"); //Click on New button eventHelper.ClickElement("NewCertificate"); //Verify title verifyTitle("Add Gift Certificate"); //Enter Name eventHelper.type("CertificateName", giftName); //Enter value eventHelper.type("CertificateValue", "10"); //Enter limit eventHelper.type("CertificateLimit", "10"); //Click on Active checkbox eventHelper.ClickElement("CertificateActive"); //Click on Save button eventHelper.ClickElement("PageSave"); //Verify title verifyTitle("Gift Certificates"); //Wait for text eventHelper.WaitForTextInPage(giftName, 30); //Click on on Home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage("Cart", 40); //Logout from the application Logout(); //Click on giftcertificate tab. eventHelper.ClickElement("CertificateTab"); //Verify title verifyTitle("Gift Certificates"); //Wait fro text eventHelper.WaitForTextInPage(giftName, 30); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreateCertificate - Artzy"); }
public void createInstructor() { Console.WriteLine("_12CreateInstructor"); String Ins = "AutomatedInstructor" + AlwaysRandom(); String InsEmail = Ins + "@yopmail.com"; String eventName = "AutomatedEvent" + AlwaysRandom(); int today = GetTodayDate() + 1; string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Event dropdown eventHelper.ClickElement("EventDropdown"); //Scroll to element eventHelper.scrollToElement("CreateIns"); //Click on Create instructor eventHelper.ClickElement("CreateIns"); //Wait for text eventHelper.WaitForTextInPage("Instructors", 30); //Verify Title verifyTitle("Instructor List"); if(eventHelper.verifyAvailable("EditIns")) { //Click on Edit button eventHelper.ClickElement("EditIns"); } else { //Click on new button eventHelper.ClickElement("NewButton"); } //Wait for text eventHelper.WaitForTextInPage("Instructor Bio", 30); //Verify Title verifyTitle("Manage Profile"); //Enter Email // eventHelper.type("InsEmail", InsEmail); //Enter First name eventHelper.type("InsFirst", Ins); //Enter Last name eventHelper.type("InsLast", "Last"); //Enter company eventHelper.type("InsCom", "Company"); //Enter job eventHelper.type("InsJob", "Job"); //Enter BIO eventHelper.typeDescription(0, "This is new "+Ins +"Instructor"); //Click on Save button eventHelper.ClickElement("InsSave"); //wait for text eventHelper.WaitForTextInPage(Ins + " Last", 30); //Delete the created instructor eventHelper.updateIns("Table", Ins + " Last","Delete"); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreateInstructor - Artzy"); }
public void createEvent() { Console.WriteLine("_15CreateEvent"); String eventName = "AUTOMATEDEVENT" + AlwaysRandom(); int today = GetTodayDate() + 1; string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); eventHelper.SetInFile("EventName", eventName); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Event dropdown eventHelper.ClickElement("EventDropdown"); //Click on List eventHelper.ClickElement("EventList"); //verify event available if (!eventHelper.verifyAvailable("EventNotavailable")) { //Click on Edit button eventHelper.ClickElement("EventEdit"); //Verify title verifyTitle("Edit"); } else { //scroll to element eventHelper.scrollToElement("CreateEvent"); //Click on New button eventHelper.ClickElement("CreateEvent"); //verify title verifyTitle("Create"); } //Wait for text eventHelper.WaitForTextInPage("Event Title", 60); //Enter event Title eventHelper.type("EventTitle", eventName); //Select Start date eventHelper.SelectDate("EventStart", today.ToString()); //Click on Hours field. eventHelper.ClickElement("EventTime"); //Wait for element eventHelper.WaitForTextInPage("30",20); //Click on 'Hours eventHelper.ClickElement("EventHrs"); //Click on Min eventHelper.ClickElement("EventMin"); //Click on DONE eventHelper.ClickElement("Done"); if (GetWebDriver().Title.Contains("Edit")) { //Click on 'Save edit event' button eventHelper.ClickElement("SaveEditEvent"); //Wait for text eventHelper.WaitForTextVisible("Success: Your event details have been updated.", 20); } //Click on New Ticket eventHelper.ClickElement("EntTicket"); //Enter ticket name eventHelper.typeInLastElement("EventTicketName", "Paid"); //Enter ticket quantity eventHelper.typeInLastElement("EventTicketQuantity", "100"); //Enter ticket price eventHelper.typeInLastElement("EventTicketPrice", "150"); if (GetWebDriver().Title.Contains("Edit")) { //Click on 'Save edit ticket' button eventHelper.ClickElement("SaveEditTicket"); //wait for text eventHelper.WaitForTextVisible("Success: Your tickets details have been updated.", 50); } if(GetWebDriver().Title.Contains("Edit")) { //scroll to element eventHelper.scrollToElement("EventList"); //Click on list tab eventHelper.ClickElement("EventList"); } else { //Click on Create event button eventHelper.ClickElement("CreateButton"); } //Wait for text displayed //eventHelper.WaitForTextInPage("Filter Name", 60); //Verify title verifyTitle("List"); //Click on 'List' eventHelper.ClickElement("ListEvent"); //Wait for text in page eventHelper.WaitForTextInPage(eventName,30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreateEvent - Artzy"); }
public void verifyTicketDiscount() { Console.WriteLine("_25VerifyTicketDiscount"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); String eventName = loginHelper.GetFromFile("EventName"); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on on Home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage("Cart", 40); //Logout from the application Logout(); //Click on Event tab. eventHelper.ClickElement("EventTab"); //Verify title verifyTitle("Upcoming Events"); //Click on event eventHelper.clickOnEvent(eventName); //wait for tickets eventHelper.WaitForTextInPage("Tickets", 20); //Enter quantity eventHelper.type("Quantity", "10"); //Click ON Buy now button eventHelper.ClickElement("BuyNow"); //wait for text eventHelper.WaitForTextInPage("Remove", 30); string discountcode = eventHelper.GetFromFile("DiscountCode"); //write code eventHelper.type("entercode", discountcode); //Scroll to element eventHelper.scrollToElement("applycode"); //click on apply eventHelper.ClickElement("applycode"); //verify text eventHelper.verifyAvailable("VerifyCode"); }
public void addToCart() { string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); String eventName = loginHelper.GetFromFile("EventName"); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on on Home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage("Cart", 40); //Logout from the application Logout(); //Click on Event tab. eventHelper.ClickElement("EventTab"); //Verify title verifyTitle("Upcoming Events"); //Click on event eventHelper.clickOnEvent(eventName); //wait for tickets eventHelper.WaitForTextInPage("Tickets", 20); //Enter quantity eventHelper.type("Quantity", "10"); //Click on Add To cart button eventHelper.ClickElement("AddtoCartButton"); //Wait for text eventHelper.WaitForTextInPage("Click 'Checkout' to proceed to the checkout process.", 20); //Click on Cart eventHelper.ClickElement("CartTab"); //Wait for text in page eventHelper.WaitForTextInPage("Remove", 30); //Verify ticket name available eventHelper.WaitForTextInPage("Paid", 20); //Click on Remove button eventHelper.ClickElement("RemoveCart"); //Accept alert eventHelper.acceptAlert(); //Verify ticket removed success fully eventHelper.WaitForTextInPage("Ticket removed from cart successfully.", 30); Console.WriteLine("BuyTicket"); //Capture screenshot fot the screen loginHelper.TakeScreenshot("BuyTicket - Artzy"); }
public void eventDurationValidation() { String evedur = "Duration" + AlwaysRandom(); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Event dropdown eventHelper.ClickElement("EventDropdown"); //Scroll down eventHelper.scrollToElement("EventDu"); //Click on Event duration eventHelper.ClickElement("EventDu"); //Wait for text eventHelper.WaitForTextInPage("Length", 30); //Verify Title verifyTitle("Settings"); //Click on Add New Length button eventHelper.ClickElement("NewLength"); //Wait for text hide eventHelper.WaitForTextHide("Your new event length is being created.",30); //Wait for text eventHelper.WaitForTextInPage("Display Text", 30); //Click on Save button button without filling details eventHelper.ClickElement("DurSave"); //Verify Validation message eventHelper.WaitForTextInPage("Event Length should not be blank.", 30); //Logout from the application Logout(); Console.WriteLine("EventDurationValidation"); //Capture screenshot fot the screen loginHelper.TakeScreenshot("EventDurationValidation - Artzy"); }
public void buyCertificate() { Console.WriteLine("_17BuyCertificate"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); String giftName = loginHelper.GetFromFile("Certificate"); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); eventHelper.SetInFile("Certificate", giftName); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on on Home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage("Cart", 40); //Logout from the application //Logout(); //Click on giftcertificate tab. eventHelper.ClickElement("CertificateTab"); //Verify title verifyTitle("Gift Certificates"); //Wait fro text eventHelper.WaitForTextInPage(giftName, 30); //wait for tickets eventHelper.WaitForTextInPage("Gift Certificates", 20); //Enter quantity eventHelper.type("Quantity", "1"); //Click ON Buy now button eventHelper.ClickElement("BuyNow"); //wait for text eventHelper.WaitForTextInPage("Remove", 30); //Enter first name eventHelper.type("UserFirst", "Test"); //Enter Last Name eventHelper.type("UserLast", "Buy Certificate"); //Enter email //eventHelper.type("UserEmail", "*****@*****.**"); //Enter card number eventHelper.type("Card", "4242424242424242"); //Enter cvv eventHelper.type("CVV", "321"); eventHelper.scrollToElement("Month"); //Select Month eventHelper.SelectLastFilterValue("Month", "05 - May"); //Select year eventHelper.SelectValueFilter("Year", "2019"); //Enter First name eventHelper.type("CardFirst", "Test"); //Enter last Name eventHelper.type("CardLast", "Buy"); //Enter address eventHelper.type("CardAdd", "Test Add"); //Enter city eventHelper.type("CardCity", "Alaska"); //Select State eventHelper.SelectValueFilter("CardState", "Alaska"); //Enter Zip eventHelper.type("CardZip", "201301"); //Click on Submit button eventHelper.ClickElement("Submit"); //Wait for order code eventHelper.WaitForTextInPage("Order Code:", 30); //Capture screenshot fot the screen loginHelper.TakeScreenshot("BuyCertificate - Artzy"); }
public void verifyCoantactValidation() { Console.WriteLine("_24VerifyCoantactValidation"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on on Home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage("Cart", 40); //Logout from the application Logout(); //Click on Contact tab. eventHelper.ClickElement("ContactTab"); //Verify title verifyTitle("Contact"); //wait for tickets eventHelper.WaitForTextInPage("First Name", 20); //Scroll to element eventHelper.scrollToElement("SendContact"); //Click on Send button eventHelper.ClickElement("SendContact"); //Wait for text eventHelper.WaitForTextInPage("First name is required.", 20); eventHelper.WaitForTextInPage("Last name is required.", 20); eventHelper.WaitForTextInPage("Email address is required.", 20); eventHelper.WaitForTextInPage("Message is required", 20); //Capture screenshot fot the screen loginHelper.TakeScreenshot("verifyCoantactValidation - Artzy"); }
public void creatCertificateValidation() { Console.WriteLine("_16CreatCertificateValidation"); String giftName = "AutomatedGift" + AlwaysRandom(); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Srcoll to element eventHelper.scrollToElement("CeateCertificate"); //Click on Create certificare eventHelper.ClickElement("CeateCertificate"); //Verify title verifyTitle("Gift Certificates"); //Click on New button eventHelper.ClickElement("NewCertificate"); //Verify title verifyTitle("Add Gift Certificate"); //Enter Name eventHelper.type("CertificateName", giftName); //Click V eventHelper.ClickElement("CertificateValue"); //Click on Save button eventHelper.ClickElement("PageSave"); //Verify Validation message eventHelper.WaitForTextInPage("Please enter value.", 30); eventHelper.WaitForTextInPage("Values should be numeric and greater than zero", 30); eventHelper.WaitForTextInPage("Limit should be integer and greater than zero.", 30); //Enter value in negative eventHelper.type("CertificateValue", "-1"); //Click on Save button eventHelper.ClickElement("PageSave"); //Verify Validation message eventHelper.WaitForTextInPage("Values should be numeric and greater than zero", 30); //Enter value eventHelper.type("CertificateValue", "1"); //Enter limit in negative eventHelper.type("CertificateLimit", "-1"); //Click on Save button eventHelper.ClickElement("PageSave"); //Verify validation eventHelper.WaitForTextInPage("Limit should be integer and greater than zero.", 30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreateCertificateValidation - Artzy"); }
public void createPage() { Console.WriteLine("_17CreatePage"); String pagename = "Page" + AlwaysRandom(); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Site dropdown eventHelper.ClickElement("SiteDropdown"); //Scroll down eventHelper.scrollToElement("Pages"); //Click on Pages eventHelper.ClickElement("Pages"); //Verify Title verifyTitle("Pages"); bool result = eventHelper.verifyAvailable("PageAvail"); //Click on Add New Page button eventHelper.ClickElement("NewPage"); //wait for text eventHelper.WaitForTextInPage("Create New", 30); //Enter Page Name eventHelper.type("PageName", pagename); //Type description eventHelper.typeDescription(0, "This is new " + pagename); //Click on Save button eventHelper.performClick("PageSave"); //Wait for text eventHelper.WaitForTextInPage("Action", 30); eventHelper.SetInFile("Page", pagename); //Click on home tab eventHelper.ClickElement("Home"); //Wait for text eventHelper.WaitForTextInPage(pagename,30); //click on page tab eventHelper.ClickLink(pagename); //wait for text eventHelper.WaitForTextInPage("This is new " + pagename,30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreatePage - Artzy"); }
public void createPageChild() { Console.WriteLine("_17CreatePageChild"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); eventHelper = new EventHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); string pagename = loginHelper.GetFromFile("Page"); string childname = "Child" + AlwaysRandom(); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on Site dropdown eventHelper.ClickElement("SiteDropdown"); //Scroll down eventHelper.scrollToElement("Navigate"); //Click on Navigation eventHelper.ClickElement("Navigate"); //Wait for text eventHelper.WaitForTextInPage("Navigation", 30); //Verify Title verifyTitle("Navigation"); //Click on New folder eventHelper.ClickElement("newfolder"); //wait for text eventHelper.WaitForTextInPage("Manage Navigation", 30); //enter folder name eventHelper.type("foldername","child1"); //click on save eventHelper.ClickElement("savenav"); //Waitfor text hide eventHelper.WaitForTextHide("Manage Navigation", 30); //wait for text eventHelper.WaitForTextInPage("Navigation saved successfully.", 30); //Wait for text eventHelper.WaitForTextInPage("Sub navigation place holder", 30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreatePageChild - Artzy"); }